Parcourir la source

[mapping] fix issue with variable by reference

gedi il y a 13 ans
Parent
commit
5dd85ed51e
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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);
     }
 
     /**