Bug #62200 [NEW]: __set_state() not implemented
| From: | bkam at citiesunlimited dot com | Date: | Thu, 31 May 2012 23:50:43 +0000 |
| Subject: | Bug #62200 [NEW]: __set_state() not implemented | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-170959@lists.php.net to get a copy of this message | ||
From: bkam at citiesunlimited dot com
Operating system: All
PHP version: 5.4.3
Package: SPL related
Bug Type: Bug
Bug description:__set_state() not implemented
Description:
------------
Pretty simple, var_export of SPL traversibles shows Class::__set_state([])
but
actually calling that function throws an undefined method error.
This is specifically true for ArrayObject, but generally true for all the
traversibles with inaccessible internal structures.
Test script:
---------------
//first
$a = new ArrayObject();
$a['key'] = 'value';
var_export($a);
// returns
//"ArrayObject::__set_state(array( 'key' => 'value', ))"
$ao = ArrayObject::__set_state(['thing' => 'value']);
//returns
//"Fatal error: Call to undefined method ArrayObject::__set_state()"
Expected result:
----------------
"ArrayObject::__set_state(array( 'key' => 'value', ))"
""
Actual result:
--------------
"Fatal error: Call to undefined method ArrayObject::__set_state()"
--
Edit bug report at https://bugs.php.net/bug.php?id=62200&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62200&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62200&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62200&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62200&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62200&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62200&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62200&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62200&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62200&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62200&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62200&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62200&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62200&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62200&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62200&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62200&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62200&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62200&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62200&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62200&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62200&r=mysqlcfg