]> git.joonet.de Git - adminer.git/commitdiff
Print SQL errors as comments in export
authorJakub Vrana <jakub@vrana.cz>
Sun, 23 Feb 2025 16:42:23 +0000 (17:42 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 23 Feb 2025 16:42:23 +0000 (17:42 +0100)
adminer/include/functions.inc.php
changes.txt

index 397b7266f4b9485491ddb757b64e895396c6a4dc..fb3c745e568ce2538e0cb62fae5a12fa6934324d 100644 (file)
@@ -392,7 +392,7 @@ function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
                while ($row = $result->fetch_assoc()) {
                        $return[] = $row;
                }
-       } elseif (!$result && !is_object($connection2) && $error && defined("PAGE_HEADER")) {
+       } elseif (!$result && !is_object($connection2) && $error && (defined("PAGE_HEADER") || $error == "-- ")) {
                echo $error . error() . "\n";
        }
        return $return;
index 02a6d2ff08202bd7c2b790ed65f867d8e4c8e8a0..663eb9b91a3dba27e888bb13890b7593cef7c1ca 100644 (file)
@@ -1,6 +1,7 @@
 Adminer 4.17.0-dev:
 Hide index column options by default
 Offer original values in multi-row editing (regression from 4.16.0)
+Print SQL errors as comments in export (regression from 3.2.0)
 MySQL, PostgreSQL, MS SQL: Support CHECK constraint
 MySQL: Show comments at routine call (bug #874)
 MySQL: Don't offer empty enum value in edit