1
0
mirror of synced 2025-01-09 18:47:10 +03:00
This commit is contained in:
Benjamin Eberlei 2014-06-03 17:05:02 +02:00
parent 2101a8fdc6
commit e577e77867

View File

@ -908,9 +908,8 @@ class ClassMetadataInfo implements ClassMetadata
public function newInstance() public function newInstance()
{ {
if ($this->_prototype === null) { if ($this->_prototype === null) {
if (PHP_VERSION_ID >= 50400) { if (PHP_VERSION_ID === 50428 || PHP_VERSION_ID === 50513) {
$rc = new \ReflectionClass($this->name); $this->_prototype = $this->reflClass->newInstanceWithoutConstructor();
$this->_prototype = $rc->newInstanceWithoutConstructor();
} else { } 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));
} }