Bug #13073 Updated: empty() returns wrong value

From: Date: Fri, 31 Aug 2001 10:31:41 +0000
Subject: Bug #13073 Updated: empty() returns wrong value
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-64783@lists.php.net to get a copy of this message
ID: 13073 Updated by: cynic Reported By: carsten.senf@novasib.de Old Status: Open Status: Bogus Bug Type: Variables related Operating System: Linux, Windows2000 PHP Version: 4.0.6 New Comment: I suggest you turn your attention to the PHP manual. (Though I admit that the fact that empty() returns true for 0 and "0" could be stresse more in the manual page.) Previous Comments: ------------------------------------------------------------------------ [2001-08-31 04:19:28] carsten.senf@novasib.de Hi, the value of iid comes from the URL-request-string. I.e. &iid=0 If I test of the emptyness of $iid, empty($iid) returns FALSE, but $iid is not empty. if (empty($iid)) { $iid = '5.1'; } The test "if ($iid == '') returns the right value. regards, Carsten ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13073&edit=1

« previous php.dev (#64783) next »