diff --git a/phpmyfaq/admin/category.main.php b/phpmyfaq/admin/category.main.php index 2801d3af1e..ca48f52114 100644 --- a/phpmyfaq/admin/category.main.php +++ b/phpmyfaq/admin/category.main.php @@ -189,7 +189,7 @@ $categoryLang = Filter::filterInput(INPUT_POST, 'catlang', FILTER_SANITIZE_SPECIAL_CHARS); $existingImage = Filter::filterInput(INPUT_POST, 'existing_image', FILTER_SANITIZE_SPECIAL_CHARS); $existingImage = is_null($existingImage) ? '' : $existingImage; - $image = count($uploadedFile) ? $categoryImage->getFileName( + $image = ($uploadedFile instanceof UploadedFile) ? $categoryImage->getFileName( $categoryId, $categoryLang ) : $existingImage;