From: storm at mail dot up dot com dot ua
Operating system: FreeBsd 5.3
PHP version: 5.0.5
PHP Bug Type: Scripting Engine problem
Bug description: Problem with empty()
Description:
------------
Various results empty() for nonexistent key
Reproduce code:
---------------
$w=array('a'=>'aaaa','b'=>array('dd'=>1,'aa'=>2));
foreach($w as $k=>$v)
{
if(empty($v['dd']))
echo "{$k}:empty<br>\n";
else
echo "{$k}:no empty<br>\n";
}
Expected result:
----------------
a:empty<br>
b:no empty<br>
(PHP 5.03 FreeBsd 4.9)
Actual result:
--------------
a:no empty<br>
b:no empty<br>
(PHP 5.05 FreeBsd 5.3)
--
Edit bug report at http://bugs.php.net/?id=35051&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35051&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=35051&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=35051&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35051&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35051&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35051&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35051&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35051&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35051&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35051&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35051&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35051&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35051&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35051&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35051&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35051&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35051&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35051&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35051&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35051&r=mysqlcfg