Selaa lähdekoodia

Moved one line

cevou 12 vuotta sitten
vanhempi
commit
329bf0a146
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php

+ 1 - 1
lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php

@@ -97,8 +97,8 @@ class NestedTreeRepository extends AbstractTreeRepository
                     throw new \Gedmo\Exception\InvalidArgumentException('If "Of" is specified you must provide parent or sibling as the second argument');
                 }
                 $parentOrSibling = $args[1];
-                $wrappedParentOrSibling = new EntityWrapper($parentOrSibling, $this->_em);
                 if (strstr($method,'Sibling')) {
+                    $wrappedParentOrSibling = new EntityWrapper($parentOrSibling, $this->_em);
                     $newParent = $wrappedParentOrSibling->getPropertyValue($config['parent']);
                     if (is_null($newParent)) {
                         throw new UnexpectedValueException("Cannot persist sibling for a root node, tree operation is not possible");