An BC issue in unserialize

From: Date: Thu, 17 Jul 2014 04:01:10 +0000
Subject: An BC issue in unserialize
Groups: php.internals 
Request: Send a blank email to internals+get-75633@lists.php.net to get a copy of this message
Hey: I was trying play with OroCRM. then I find a BC break in PHP-5.6 the usage is : /** * Creates a new instance of the mapped class, without invoking the constructor. * * @return object */ public function newInstance() { if ($this->_prototype === null) { $this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name)); } return clone $this->_prototype; } it works fine in PHP-5.5, but in 5.6 , the serialize will fail after fix 5328d4289946e260232f3195ba2e0f0eb173d5ef then I found, Stas did a re-fix for that: 342240fd7fb6ac0a287eb6f912c4d61d6274d68c but it seems doesn't go into 5.6.. I am not sure now. should this usage be supported? thanks -- Laruence Xinchen Hui http://www.laruence.com/

« previous php.internals (#75633) next »