]> git.joonet.de Git - adminer.git/commitdiff
Fix undefined variable
authorJakub Vrana <jakub@vrana.cz>
Fri, 7 Mar 2025 03:56:31 +0000 (04:56 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 7 Mar 2025 03:56:31 +0000 (04:56 +0100)
adminer/include/editing.inc.php

index a676448fedda0ece907530dfb33d12ceffa8b1c4..3015496e9e1001b25d186208c9573fe08b5dfe01 100644 (file)
@@ -255,7 +255,8 @@ function get_partitions_info($table) {
 */
 function process_length($length) {
        global $driver;
-       return (preg_match("~^\\s*\\(?\\s*$driver->enumLength(?:\\s*,\\s*$enum_length)*+\\s*\\)?\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches)
+       $enum_length = $driver->enumLength;
+       return (preg_match("~^\\s*\\(?\\s*$enum_length(?:\\s*,\\s*$enum_length)*+\\s*\\)?\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches)
                ? "(" . implode(",", $matches[0]) . ")"
                : preg_replace('~^[0-9].*~', '(\0)', preg_replace('~[^-0-9,+()[\]]~', '', $length))
        );