Kaynağa Gözat

Fix PropertyAccessor factory method calls

Stepan Anchugov 11 yıl önce
ebeveyn
işleme
7ad7232fe1
2 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 1 1
      Admin/Admin.php
  2. 1 1
      Twig/Extension/SonataAdminExtension.php

+ 1 - 1
Admin/Admin.php

@@ -872,7 +872,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
         if ($this->isChild() && $this->getParentAssociationMapping()) {
             $parent = $this->getParent()->getObject($this->request->get($this->getParent()->getIdParameter()));
 
-            $propertyAccessor = PropertyAccess::getPropertyAccessor();
+            $propertyAccessor = PropertyAccess::createPropertyAccessor();
             $propertyPath = new PropertyPath($this->getParentAssociationMapping());
 
             $object = $this->getSubject();

+ 1 - 1
Twig/Extension/SonataAdminExtension.php

@@ -227,7 +227,7 @@ class SonataAdminExtension extends \Twig_Extension
             return call_user_func(array($element, $method));
         }
 
-        return PropertyAccess::getPropertyAccessor()->getValue($element, $propertyPath);
+        return PropertyAccess::createPropertyAccessor()->getValue($element, $propertyPath);
     }
 
     /**