#19056 [Opn->Bgs]: empty() function is completely broken
| From: | rasmus@php.net | Date: | Thu, 22 Aug 2002 19:52:19 +0000 |
| Subject: | #19056 [Opn->Bgs]: empty() function is completely broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17587@lists.php.net to get a copy of this message | ||
ID: 19056
Updated by: rasmus@php.net
Reported By: adets@idsk.com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux
PHP Version: 4.2.2
New Comment:
The example in the documentation shows clearly that empty() returns
true when a var is not set or when it is set to something that
evaluates to 0. If you only want to check whether something is set,
use the isset() function.
Previous Comments:
------------------------------------------------------------------------
[2002-08-22 15:47:04] adets@idsk.com
empty() function is not working correctly.
It returns true if variable has a value of: 0 & 0.0
(integer, float), false (boolean) or "0" (string).
This makes this function COMPLETELY USELESS.
Is it possible to implement this function correctly (it
will be great!!!), remove it at
all (because it is useless now) or at least correct
documentation?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19056&edit=1