From e577e7786796e9393df381f02221046dea6253a5 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Tue, 3 Jun 2014 17:05:02 +0200 Subject: [PATCH] Cleanup 93c276d --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 1216fcfb8..0f7919ea9 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -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)); }