Explorar el Código

[mapping] fix issue with variable by reference

gedi hace 13 años
padre
commit
5dd85ed51e
Se han modificado 1 ficheros con 2 adiciones y 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);
     }
 
     /**