Explorar o código

[mapping] fix issue with variable by reference

gedi %!s(int64=13) %!d(string=hai) anos
pai
achega
5dd85ed51e
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      lib/Gedmo/Mapping/MappedEventSubscriber.php

+ 2 - 1
lib/Gedmo/Mapping/MappedEventSubscriber.php

@@ -76,7 +76,8 @@ abstract class MappedEventSubscriber implements EventSubscriber
      */
     public function __construct()
     {
-        $this->name = end(explode('\\', $this->getNamespace()));
+        $parts = explode('\\', $this->getNamespace());
+        $this->name = end($parts);
     }
 
     /**