#27647 [NEW]: empty() does not work correctly

From: Date: Fri, 19 Mar 2004 03:15:49 +0000
Subject: #27647 [NEW]: empty() does not work correctly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56658@lists.php.net to get a copy of this message
From:             simen at amaxit dot net
Operating system: Solaris 5.8 Sparc
PHP version:      4.3.5RC4
PHP Bug Type:     Unknown/Other Function
Bug description:  empty() does not work correctly

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


-- 
Edit bug report at http://bugs.php.net/?id=27647&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27647&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27647&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27647&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27647&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27647&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27647&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27647&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27647&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27647&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27647&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27647&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27647&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27647&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27647&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27647&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27647&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27647&r=float


Thread (2 messages)

« previous php.bugs (#56658) next »