Просмотр исходного кода

Fixed: Missed variables in the TranslationRepository class

Victor 13 лет назад
Родитель
Сommit
532fbcbc00

+ 2 - 2
lib/Gedmo/Translatable/Document/Repository/TranslationRepository.php

@@ -139,14 +139,14 @@ class TranslationRepository extends DocumentRepository
             $q->setHydrate(false);
             $result = $q->execute();
             if ($result instanceof Cursor) {
-                $result = $data->toArray();
+                $result = $result->toArray();
             }
             $id = count($result) ? $result[0]['foreignKey'] : null;
             if ($id) {
                 $document = $this->dm->find($class, $id);
             }
         }
-        return $entity;
+        return $document;
     }
 
     /**