From 33348c5ed52648669c7a503228ff09255da9be5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 25 Aug 2016 14:30:13 +0200 Subject: [PATCH] Allow to specify length of 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue #12480 Signed-off-by: Michal Čihař --- libraries/Table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Table.php b/libraries/Table.php index 7d9feab943..49e42750d7 100644 --- a/libraries/Table.php +++ b/libraries/Table.php @@ -399,7 +399,7 @@ class Table // $pattern = '@^(DATE|TINYBLOB|TINYTEXT|BLOB|TEXT|' . 'MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|SERIAL|BOOLEAN|UUID)$@i'; - if ($length != '' && ! preg_match($pattern, $type)) { + if (strlen($length) !== 0 && ! preg_match($pattern, $type)) { $query .= '(' . intval($length) . ')'; }