From: roman dot tvrdy at gmail dot com
Operating system: Linux - Gentoo
PHP version: 5.2.6
PHP Bug Type: *General Issues
Bug description: isset does not work correctly after ArrayObject
Description:
------------
Function isset does not work identically for object created by
ArrayObject(). For example code I have this output :
object(ArrayObject)[1]
public 'aa' => string 'some content' (length=12)
ko : isset does not work after ArrayObject()
object(stdClass)[2]
public 'aa' => string 'some content' (length=12)
ok : isset work after (object)
Reproduce code:
---------------
$content = array('aa' => 'some content');
// ********************************* //
$prm = new ArrayObject($content);
var_dump($prm);
if (isset($prm->aa) === true) echo 'ok : isset work after ArrayObject()';
else echo 'ko : isset does not work after ArrayObject()';
// ********************************* //
$prm = (object) $content;
var_dump($prm);
if (isset($prm->aa) === true) echo 'ok : isset work after (object)';
else echo 'ko : isset does not work after (object)';
Expected result:
----------------
Same behavior for both use.
--
Edit bug report at http://bugs.php.net/?id=46605&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46605&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46605&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46605&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46605&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=46605&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46605&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=46605&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=46605&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=46605&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=46605&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=46605&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46605&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46605&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46605&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46605&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46605&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=46605&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=46605&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=46605&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=46605&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=46605&r=mysqlcfg