moved php version check
This commit is contained in:
parent
bf92a40171
commit
73e2aa54ef
1 changed files with 2 additions and 4 deletions
|
@ -759,14 +759,12 @@ public function __construct()
|
||||||
*/
|
*/
|
||||||
protected function getTraits(ClassMetadataInfo $metadata)
|
protected function getTraits(ClassMetadataInfo $metadata)
|
||||||
{
|
{
|
||||||
if ($metadata->reflClass !== null || class_exists($metadata->name)) {
|
if (PHP_VERSION_ID >= 50400 && ($metadata->reflClass !== null || class_exists($metadata->name))) {
|
||||||
$reflClass = $metadata->reflClass === null
|
$reflClass = $metadata->reflClass === null
|
||||||
? new \ReflectionClass($metadata->name)
|
? new \ReflectionClass($metadata->name)
|
||||||
: $metadata->reflClass;
|
: $metadata->reflClass;
|
||||||
|
|
||||||
if (PHP_VERSION_ID >= 50400) {
|
return $reflClass->getTraits();
|
||||||
return $reflClass->getTraits();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return array();
|
return array();
|
||||||
|
|
Loading…
Add table
Reference in a new issue