소스 검색

[DoctrineMongoDbLogger] fixed the "Call to a member function getDebugLogger() on a non-object" error

Kévin Dunglas 14 년 전
부모
커밋
915973f458
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Symfony/Bundle/DoctrineMongoDBBundle/Logger/DoctrineMongoDBLogger.php

+ 4 - 0
src/Symfony/Bundle/DoctrineMongoDBBundle/Logger/DoctrineMongoDBLogger.php

@@ -39,6 +39,10 @@ class DoctrineMongoDBLogger
 
     public function getQueries()
     {
+        if (null === $this->logger) {
+            return false;
+        }
+
         $logger = $this->logger->getDebugLogger();
 
         if (!$logger) {