From: Jakub Vrana Date: Fri, 20 Dec 2013 02:35:30 +0000 (-0800) Subject: Fix processing length without () X-Git-Tag: v4.0.0~26 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=45540fdae9f3152fcaf8437a4bbb793f156016cd;p=adminer.git Fix processing length without () --- diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index f0a0c475..c87417c3 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -164,7 +164,7 @@ function process_length($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) ? "(" . implode(",", $matches[0]) . ")" - : preg_replace('~[^-0-9,+()[\]]~', '', preg_replace('~^[0-9]+~', '(\1)', $length)) + : preg_replace('~^[0-9].*~', '(\0)', preg_replace('~[^-0-9,+()[\]]~', '', $length)) ); }