From 88aa6a83338954e789ac48fe4b4aec7a3e227265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 27 Nov 2017 18:20:54 +0100 Subject: [PATCH] Avoid using empty and workarounding its match to zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/create_addfield.lib.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/create_addfield.lib.php b/libraries/create_addfield.lib.php index 8f8e9e00fb..05e7c4c90d 100644 --- a/libraries/create_addfield.lib.php +++ b/libraries/create_addfield.lib.php @@ -45,9 +45,7 @@ function PMA_buildColumnCreationStatement( $definitions = array(); for ($i = 0; $i < $field_cnt; ++$i) { // '0' is also empty for php :-( - if (empty($_REQUEST['field_name'][$i]) - && $_REQUEST['field_name'][$i] != '0' - ) { + if (strlen($_REQUEST['field_name'][$i]) === 0) { continue; }