From 55f505e6e432e0c864a7525faf0a69fc1fa05a2d Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 31 Dec 2021 06:34:15 +0200 Subject: [PATCH] fix variables registry --- src/application/controller/api/image.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/application/controller/api/image.php b/src/application/controller/api/image.php index 22b71dd..01f9bb4 100755 --- a/src/application/controller/api/image.php +++ b/src/application/controller/api/image.php @@ -2,18 +2,18 @@ if (isset($_GET['hash'])) { - $filename = md5($_GET['hash']); - $filepath = PROJECT_DIR . '/cache/image/' . $filename . '.jpeg'; + $fileName = md5($_GET['hash']); + $filePath = PROJECT_DIR . '/cache/image/' . $fileName . '.jpeg'; - if (!file_exists($filepath)) { + if (!file_exists($filePath)) { $icon = new Icon(); - $image = $icon->generateImageResource($filename, 42, 42, false); + $image = $icon->generateImageResource($fileName, 42, 42, false); - file_put_contents($filepath, $image); + file_put_contents($filePath, $image); } - $image = file_get_contents($filepath); + $image = file_get_contents($filePath); header("Content-Type: image/jpeg");