diff --git a/includes/page_submit.php b/includes/page_submit.php index 590d471..cc973b0 100644 --- a/includes/page_submit.php +++ b/includes/page_submit.php @@ -104,7 +104,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { $errorMessage = "An unexpected error occurred while uploading the cover image."; } if (!$fileError) { - $uploadedCoverImagePathname = $modPendingUploadDirectory . '/' . str_replace(['/', '\\'], '', $modDataToEdit['slug']) . '.' . $fileExtension; + $uploadedCoverImagePathname = $modPendingUploadDirectory . '/' . str_replace(['/', '\\'], '', $slug) . '.' . $fileExtension; if (!move_uploaded_file($fileTmpPath, $uploadedCoverImagePathname)) { $fileError = true; $errorMessage = "An unexpected error occurred while uploading the cover image."; @@ -255,4 +255,4 @@ if ($modSubmitted) { sendEmail($moderators, 'A mod has been submitted that requires approval', "A mod has been submitted that requires approval:\n\nMod name: " . str_replace(["\r\n", "\r", "\n"], '', $_POST['name']) . "\nSlug: " . $slug . "\n\nPlease review the mod and approve or reject it."); } } -?> \ No newline at end of file +?>