From 2d34f9f26264953a1c1a924deef28c17dc51a92f Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Thu, 31 Jan 2019 02:14:14 -0700 Subject: [PATCH] Fix PHP warning --- cache/handle_404.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cache/handle_404.php b/cache/handle_404.php index ae93f14..53e384c 100644 --- a/cache/handle_404.php +++ b/cache/handle_404.php @@ -8,7 +8,8 @@ require_once __DIR__ . "/../required.php"; -$fileparts = explode(".", end(explode("/", $_GET['file']))); +$urlparts = explode("/", $_GET['file']); +$fileparts = explode(".", end($urlparts)); if (count($fileparts) != 3 || !preg_match("/[0-9]+/", $fileparts[1]) || $fileparts[2] != "jpg") { http_response_code(403);