소스 검색

[mapping] fix issue with variable by reference

gedi 13 년 전
부모
커밋
5dd85ed51e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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);
     }
 
     /**