From 874307a27fe045e6233045c07c080c944d11f49a Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 7 Mar 2025 04:56:31 +0100 Subject: [PATCH] Fix undefined variable --- adminer/include/editing.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index a676448f..3015496e 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -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)) );