From 45540fdae9f3152fcaf8437a4bbb793f156016cd Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 19 Dec 2013 18:35:30 -0800 Subject: [PATCH] Fix processing length without () --- adminer/include/editing.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) ); }