Przeglądaj źródła

[mapping] fix issue with variable by reference

gedi 13 lat temu
rodzic
commit
5dd85ed51e
1 zmienionych plików z 2 dodań i 1 usunięć
  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);
     }
 
     /**