Using PHP_VERSION_ID
instead of version_compare
to see if we're using PHP 5.4+
This commit is contained in:
parent
a851dd68fb
commit
72750b05e6
@ -908,7 +908,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
public function newInstance()
|
||||
{
|
||||
if ($this->_prototype === null) {
|
||||
if (version_compare(PHP_VERSION, '5.4') >= 0) {
|
||||
if (PHP_VERSION_ID >= 50400) {
|
||||
$rc = new \ReflectionClass($this->name);
|
||||
$this->_prototype = $rc->newInstanceWithoutConstructor();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user