php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3986 empty("0") returns true
Submitted: 2000-03-30 15:16 UTC Modified: 2000-05-31 09:24 UTC
From: joe at soundprint dot org Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (30/03/2000) OS: linux 2.2.12
Private report: No CVE-ID: None
 [2000-03-30 15:16 UTC] joe at soundprint dot org
We've got this little snippet here that in version 3 works properly, however in php4 it has a minor problem. For all $rIA1 values other than 0 it works fine, but when $rIA1==0, empty returns true.

// $rIA1 is between 0 and 4

$rIA1=0;
if (empty($rIA1)) { 
  $filled = 0;
  echo "Please answer question: IA1 <br> ";
}

//Result
Please answer the question: IA1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-31 09:24 UTC] stas at cvs dot php dot net
Not a bug. Please read the manual.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 12:01:31 2024 UTC