diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-16 00:13:28 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-16 00:13:28 -0800 |
commit | dcf4b5e71ae8a097f133a06485d60c5fb3400824 (patch) | |
tree | 2c1e6d81d91238fa636c4dd4949ccd2bf6856c1b /modules/gallery/models | |
parent | 9f03d36d6ee5358b3081f64fc7ef0b0ae42d97db (diff) |
Don't pass MY_ORM::original() to update event handlers, since after
parent::save() it'll be reset. Clone it first.
This is an alternate fix for #978.
Diffstat (limited to 'modules/gallery/models')
-rw-r--r-- | modules/gallery/models/item.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 4a3d26e9..6851e1a3 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -416,9 +416,11 @@ class Item_Model extends ORM_MPTT { $send_event = 1; } } + + $original = clone $this->original(); parent::save(); if (isset($send_event)) { - module::event("item_updated", $this->original(), $this); + module::event("item_updated", $original, $this); } return $this; } |