]> git.joonet.de Git - adminer.git/commitdiff
Ignore error in dropping old constraint
authorJakub Vrana <jakub@vrana.cz>
Sun, 23 Feb 2025 07:41:33 +0000 (08:41 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 23 Feb 2025 07:41:33 +0000 (08:41 +0100)
adminer/check.inc.php

index 0d8b06dbbef3212a4386f9e96b49fb970fad2b81..997a09c53c7eb51a3e82afa8a526ff5f226ad7a0 100644 (file)
@@ -5,7 +5,7 @@ $row = $_POST;
 
 if ($row && !$error) {
        $result = ($name == "" || queries("ALTER TABLE " . table($TABLE) . " DROP CONSTRAINT " . idf_escape($name)));
-       if (!$row["drop"] && $result) {
+       if (!$row["drop"]) {
                $result = queries("ALTER TABLE " . table($TABLE) . " ADD" . ($row["name"] != "" ? " CONSTRAINT " . idf_escape($row["name"]) . "" : "") . " CHECK ($row[clause])"); //! SQL injection
        }
        queries_redirect(