diff --git a/lib/javascript.php b/lib/javascript.php index efc172e52a9ad..0cb40672e3f88 100644 --- a/lib/javascript.php +++ b/lib/javascript.php @@ -35,7 +35,8 @@ if ($slashargument = min_get_slash_argument()) { $slashargument = ltrim($slashargument, '/'); if (substr_count($slashargument, '/') < 1) { - image_not_found(); + header('HTTP/1.0 404 not found'); + die('Slash argument must contain both a revision and a file path'); } // image must be last because it may contain "/" list($rev, $file) = explode('/', $slashargument, 2); @@ -73,7 +74,8 @@ if (!$jsfiles) { // bad luck - no valid files - die(); + header('HTTP/1.0 404 not found'); + die('No valid javascript files found'); } $etag = sha1($rev.implode(',', $jsfiles)); diff --git a/theme/javascript.php b/theme/javascript.php index e1b9606e0e3a5..c6bda484fb8d5 100644 --- a/theme/javascript.php +++ b/theme/javascript.php @@ -35,7 +35,8 @@ if ($slashargument = min_get_slash_argument()) { $slashargument = ltrim($slashargument, '/'); if (substr_count($slashargument, '/') < 2) { - image_not_found(); + header('HTTP/1.0 404 not found'); + die('Slash argument must contain both a revision and a file path'); } // image must be last because it may contain "/" list($themename, $rev, $type) = explode('/', $slashargument, 3);