Browse Source

fix previous using undefined variable

Andrew Dolgov 5 days ago
parent
commit
d5598d9092
1 changed files with 4 additions and 4 deletions
  1. 4 4
      backend.php

+ 4 - 4
backend.php

@@ -1075,10 +1075,10 @@
 		if (!$nocache && file_exists($cache_key) && filesize($cache_key) > 0) {
 			@touch($cache_key);
 
-			$ctype = mime_content_type($cache_key);
+			$mimetype = mime_content_type($cache_key);
 
-			if ($ctype == "application/octet-stream")
-				$ctype = "video/mp4";
+			if ($mimetype == "application/octet-stream")
+				$mimetype = "video/mp4";
 
 			# block SVG because of possible embedded javascript (.....)
 			$mimetype_blacklist = [ "image/svg+xml" ];
@@ -1092,7 +1092,7 @@
 				return false;
 			}
 
-			header("Content-type: $ctype");
+			header("Content-type: $mimetype");
 			header("Cache-control: max-age=" . CACHE_LIFETIME_MAX);
 			header("Last-Modified: " .
 				gmdate("D, d M Y H:i:s \G\M\T", filemtime($cache_key)));