1
0
Fork 0
mirror of synced 2025-04-03 05:13:37 +03:00

moved php version check

This commit is contained in:
Adam Prager 2013-06-14 10:07:05 +02:00
parent bf92a40171
commit 73e2aa54ef

View file

@ -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();