summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--itjs.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/itjs.php b/itjs.php
index a037681..80cc6a7 100644
--- a/itjs.php
+++ b/itjs.php
@@ -31,7 +31,7 @@ itjs::far_future_headers(); # may exit
$files = itjs::filenames($_GET['files'] ?: it::match('/itjs/([-a-z0-9_,.]*)', $_SERVER['PHP_SELF']));
$data = itjs::filecontents($files);
-$lastfile = end($files);
+$lastfile = end($files) ?: it::match('[^,]+$', $_GET['files']); # set correct mime type even if files not found
if (it::match('\.gif$', $lastfile))
{