php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27647 empty() does not work correctly
Submitted: 2004-03-18 22:15 UTC Modified: 2004-03-23 13:40 UTC
From: simen at amaxit dot net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.3.5RC4 OS: Solaris 5.8 Sparc
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: simen at amaxit dot net
New email:
PHP Version: OS:

 

 [2004-03-18 22:15 UTC] simen at amaxit dot net
Description:
------------
empty() does not work correctly on Solaris 5.8 Sparc, but same code works well on Linux or FreeBSD.

Reproduce code:
---------------
$test[0] = 'field1';
$test[1] = 'field2';

for($i=0;!empty($test[$i]);$i++) {
    echo '<br>'.$test[$i];
}

Expected result:
----------------
field1
field2

Actual result:
--------------
nothing


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-23 13:40 UTC] iliaa@php.net
Works just fine with latest CVS. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC