[DDC-3120] Fix bug with unserialize bc break in PHP 5.4.29 and PHP 5.5.13
This commit is contained in:
parent
63c5758070
commit
530c01b5e3
@ -866,8 +866,12 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
public function newInstance()
|
public function newInstance()
|
||||||
{
|
{
|
||||||
if ($this->_prototype === null) {
|
if ($this->_prototype === null) {
|
||||||
|
if (PHP_VERSION_ID === 50428 || PHP_VERSION_ID === 50513) {
|
||||||
|
$this->_prototype = $this->reflClass->newInstanceWithoutConstructor();
|
||||||
|
} else {
|
||||||
$this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
|
$this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return clone $this->_prototype;
|
return clone $this->_prototype;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user