diff --git a/includes/page_editmod.php b/includes/page_editmod.php index 4941509..9f9db51 100644 --- a/includes/page_editmod.php +++ b/includes/page_editmod.php @@ -75,7 +75,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { } } } else { - $fileExtension = str_replace(['/', '\\'], '', $modDataToEdit['image_ext']); + $fileExtension = $modDataToEdit['image_ext'] ? str_replace(['/', '\\'], '', $modDataToEdit['image_ext']) : null; $liveCoverImagePathname = $modUploadDirectory . '/' . str_replace(['/', '\\'], '', $modDataToEdit['slug']) . '.' . $fileExtension; if (file_exists($liveCoverImagePathname)) { if (!file_exists($modPendingUploadDirectory) && !mkdir($modPendingUploadDirectory, 0777, true)) {