Cleanup 93c276d
This commit is contained in:
parent
2101a8fdc6
commit
e577e77867
@ -908,9 +908,8 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
public function newInstance()
|
||||
{
|
||||
if ($this->_prototype === null) {
|
||||
if (PHP_VERSION_ID >= 50400) {
|
||||
$rc = new \ReflectionClass($this->name);
|
||||
$this->_prototype = $rc->newInstanceWithoutConstructor();
|
||||
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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user