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'='','b'=array('dd'=1,'aa'=2));
foreach($w as $k=$v)
{
if(empty($v['dd']))
echo {$k}:emptybr\n;
else
echo {$k}:no emptybr\n;
}
Expected result:
a:emptybr
b:no emptybr
(PHP 5.03 FreeBsd 4.9)
Actual result:
--
a:no emptybr
b:no emptybr
(PHP 5.05 FreeBsd 5.3)
--
Edit bug report at http://bugs.php.net/?id=35051edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35051r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=35051r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=35051r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=35051r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=35051r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35051r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35051r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35051r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35051r=support
Expected behavior: http://bugs.php.net/fix.php?id=35051r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35051r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35051r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=35051r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35051r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=35051r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35051r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35051r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35051r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35051r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35051r=mysqlcfg