Преглед на файлове

Merge pull request #239 from spike31/master

Clone $object to use it in postRemove
Thomas преди 14 години
родител
ревизия
4303999ad6
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      Admin/Admin.php

+ 3 - 2
Admin/Admin.php

@@ -452,10 +452,11 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
     }
     }
 
 
     public function delete($object)
     public function delete($object)
-    {
+    {    
+        $media = clone $object;
         $this->preRemove($object);
         $this->preRemove($object);
         $this->modelManager->delete($object);
         $this->modelManager->delete($object);
-        $this->postRemove($object);
+        $this->postRemove($media);
     }
     }
 
 
     public function preUpdate($object)
     public function preUpdate($object)