diff --git a/doc/ChangeLog b/doc/ChangeLog index 26e4436ac4..b18ef825f1 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2012-05-31 Alexey S. Denisov + + * main/DAOs/StorableDAO.class.php: fix merging object with self + 2012-05-28 Georgiy T. Kutsurua * core/Cache/PeclMemcache.class.php diff --git a/main/DAOs/StorableDAO.class.php b/main/DAOs/StorableDAO.class.php index 4787790be7..6d24b923c5 100644 --- a/main/DAOs/StorableDAO.class.php +++ b/main/DAOs/StorableDAO.class.php @@ -67,6 +67,8 @@ public function merge(Identifiable $object, $cacheOnly = true) else $old = Cache::worker($this)->getById($object->getId()); } + if ($object === $old) + return $this->save($object); return $this->unite($object, $old); }