1
0
mirror of synced 2025-01-10 11:07:10 +03:00

Merge branch 'hotfix/php-version-id-check-in-metadata-prototype-instantiation'

This commit is contained in:
Marco Pivetta 2014-05-31 13:37:50 +02:00
commit 2101a8fdc6

View File

@ -908,7 +908,7 @@ class ClassMetadataInfo implements ClassMetadata
public function newInstance() public function newInstance()
{ {
if ($this->_prototype === null) { if ($this->_prototype === null) {
if (version_compare(PHP_VERSION, '5.4') >= 0) { if (PHP_VERSION_ID >= 50400) {
$rc = new \ReflectionClass($this->name); $rc = new \ReflectionClass($this->name);
$this->_prototype = $rc->newInstanceWithoutConstructor(); $this->_prototype = $rc->newInstanceWithoutConstructor();
} else { } else {