Bug #74687 [NEW]: __wakeup called for nested serialized object after Serializable::unserialize

From: Date: Thu, 01 Jun 2017 09:55:55 +0000
Subject: Bug #74687 [NEW]: __wakeup called for nested serialized object after Serializable::unserialize
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209337@lists.php.net to get a copy of this message
From: taco at procurios dot nl Operating system: linux PHP version: 5.6.30 Package: Unknown/Other Function Bug Type: Bug Bug description:__wakeup called for nested serialized object after Serializable::unserialize Description: ------------ When an object is unserialized within the unserialize method of a Serializable implementation, its __wakeup method will be called _after_ the unserialize call is finished, making the object invalid during the unserialize call. Most likely (based on the changelogs of the first affected php versions) this behaviour was introduced by the fix for this bug: https://bugs.php.net/bug.php?id=70213 Test script: --------------- Problem: https://3v4l.org/MlbuO .phpt file: https://gist.githubusercontent.com/tacovandenbroek/0ed29d1a449c57dfb4335d1ec4b00cae/raw/42fdc427521969f0affe719cf84f829098824ba0/php%20__wakeup%20bug.phpt -- Edit bug report at https://bugs.php.net/bug.php?id=74687&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74687&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74687&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74687&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74687&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74687&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74687&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74687&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74687&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74687&r=support Expected behavior: https://bugs.php.net/fix.php?id=74687&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74687&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74687&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74687&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74687&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74687&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74687&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74687&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74687&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74687&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74687&r=mysqlcfg

« previous php.bugs (#209337) next »