1
0
Fork 0
mirror of synced 2025-04-01 20:36:14 +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)
{
if ($metadata->reflClass !== null || class_exists($metadata->name)) {
if (PHP_VERSION_ID >= 50400 && ($metadata->reflClass !== null || class_exists($metadata->name))) {
$reflClass = $metadata->reflClass === null
? new \ReflectionClass($metadata->name)
: $metadata->reflClass;
if (PHP_VERSION_ID >= 50400) {
return $reflClass->getTraits();
}
return $reflClass->getTraits();
}
return array();