Bug #13073 Updated: empty() returns wrong value
| From: | jeroen@php.net | Date: | Fri, 31 Aug 2001 18:31:31 +0000 |
| Subject: | Bug #13073 Updated: empty() returns wrong value | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-64859@lists.php.net to get a copy of this message | ||
ID: 13073
Updated by: jeroen
Reported By: carsten.senf@novasib.de
Status: Bogus
Bug Type: Variables related
Operating System: Linux, Windows2000
PHP Version: 4.0.6
New Comment:
"empty($iid) returns FALSE, but $iid is not empty."
$iid is NOT empty, so it indeed returns false... :-)
Previous Comments:
------------------------------------------------------------------------
[2001-08-31 06:31:41] cynic@php.net
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.)
------------------------------------------------------------------------
[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