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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: joe at soundprint dot org
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Sep 28 16:01:27 2024 UTC