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
 [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-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 18 01:05:45 2022 UTC