]> git.joonet.de Git - adminer.git/commitdiff
Fix processing length without ()
authorJakub Vrana <jakub@vrana.cz>
Fri, 20 Dec 2013 02:35:30 +0000 (18:35 -0800)
committerJakub Vrana <jakub@vrana.cz>
Fri, 20 Dec 2013 02:35:30 +0000 (18:35 -0800)
adminer/include/editing.inc.php

index f0a0c475073b5f67d34c8fa7be9aee899bd3c67c..c87417c3727b9f74476165e78914cab0ca4fe665 100644 (file)
@@ -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))
        );
 }