diff --git a/sections/collages/edit_handle.php b/sections/collages/edit_handle.php
index 4f42bf99..98e995b3 100644
--- a/sections/collages/edit_handle.php
+++ b/sections/collages/edit_handle.php
@@ -15,22 +15,24 @@
error(403);
}
-$DB->query("
- SELECT ID, Deleted
- FROM collages
- WHERE Name = '".db_string($_POST['name'])."'
- AND ID != '$CollageID'
- LIMIT 1");
-if ($DB->has_results()) {
- list($ID, $Deleted) = $DB->next_record();
- if ($Deleted) {
- $Err = 'A collage with that name already exists but needs to be recovered, please contact the staff team!';
- } else {
- $Err = "A collage with that name already exists: $_POST[name].";
+if (isset($_POST['name'])) {
+ $DB->query("
+ SELECT ID, Deleted
+ FROM collages
+ WHERE Name = '".db_string($_POST['name'])."'
+ AND ID != '$CollageID'
+ LIMIT 1");
+ if ($DB->has_results()) {
+ list($ID, $Deleted) = $DB->next_record();
+ if ($Deleted) {
+ $Err = 'A collage with that name already exists but needs to be recovered, please contact the staff team!';
+ } else {
+ $Err = "A collage with that name already exists: $_POST[name].";
+ }
+ $ErrNoEscape = true;
+ include(SERVER_ROOT.'/sections/collages/edit.php');
+ die();
}
- $ErrNoEscape = true;
- include(SERVER_ROOT.'/sections/collages/edit.php');
- die();
}
$TagList = explode(',', $_POST['tags']);