From 85c5798268e4dad03c71b514f42075c914daaf6e Mon Sep 17 00:00:00 2001 From: JustCarmen Date: Mon, 17 Apr 2017 09:42:24 +0200 Subject: [PATCH] Fix fatal error in reset function when image setting does not exist. --- app/JustBlackThemeOptionsClass.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/JustBlackThemeOptionsClass.php b/app/JustBlackThemeOptionsClass.php index 77c5b85..a0ed984 100644 --- a/app/JustBlackThemeOptionsClass.php +++ b/app/JustBlackThemeOptionsClass.php @@ -346,7 +346,7 @@ private function resize($imgSrc, $type, $thumbwidth, $thumbheight) { protected function deleteImage() { $filename = $this->options('image'); - if (file_exists(WT_DATA_DIR . $filename)) { + if ($filename && file_exists(WT_DATA_DIR . $filename)) { unlink(WT_DATA_DIR . $filename); } }