1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 00:54:08 +02:00

Fix undefined variable

This commit is contained in:
Jakub Vrana
2025-03-07 04:56:31 +01:00
parent c27b91a167
commit 874307a27f

View 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))
);