Bug #17766 Updated: Variable doesnt Exist if the value of the Variable is Zero
| From: | derick@php.net | Date: | Fri, 14 Jun 2002 21:51:46 +0000 |
| Subject: | Bug #17766 Updated: Variable doesnt Exist if the value of the Variable is Zero | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10480@lists.php.net to get a copy of this message | ||
ID: 17766
Updated by: derick@php.net
Reported By: dmdeathmaker@aol.com
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: Win9x
PHP Version: 4.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2002-06-14 17:50:15] dmdeathmaker@aol.com
hi,
anyone i know who trys to test a variable do it this way:
for Example a URL-Submitted value:
(http://localhost/somephp.php?variable=0 dont works)
(http://localhost/somephp.php?variable=1 works)
(http://localhost/somephp.php?variable=2 works)
Global $variable;
if ($variable)
{
echo "Variable Exist";
} else { echo "Variable dont Exist"; }
You perhaps use it too ...
the problem is :) if the variable is value anythings
fine til the point the variable-value ist zero ... thats
the point the variable exist nomore ...
only way to proof the existens is
if (strlen($variable)!=0) echo "variable exist";
i think thats a bug ....
MfG Cybergen, Member of the Softeis Hacker Crew
PS: I think thats a generally problem
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17766&edit=1