mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
Fix processing length without ()
This commit is contained in:
@@ -164,7 +164,7 @@ function process_length($length) {
|
|||||||
global $enum_length;
|
global $enum_length;
|
||||||
return (preg_match("~^\\s*\\(?\\s*$enum_length(?:\\s*,\\s*$enum_length)*+\\s*\\)?\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches)
|
return (preg_match("~^\\s*\\(?\\s*$enum_length(?:\\s*,\\s*$enum_length)*+\\s*\\)?\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches)
|
||||||
? "(" . implode(",", $matches[0]) . ")"
|
? "(" . implode(",", $matches[0]) . ")"
|
||||||
: preg_replace('~[^-0-9,+()[\]]~', '', preg_replace('~^[0-9]+~', '(\1)', $length))
|
: preg_replace('~^[0-9].*~', '(\0)', preg_replace('~[^-0-9,+()[\]]~', '', $length))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user