From 2c2f0297912667677579511311d2bb101acad7a7 Mon Sep 17 00:00:00 2001 From: John Corser Date: Fri, 3 Jun 2016 21:31:41 +0000 Subject: [PATCH] setup model for php7 --- classes/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/model.php b/classes/model.php index 686f0c94f..7865f14a8 100644 --- a/classes/model.php +++ b/classes/model.php @@ -1353,8 +1353,6 @@ public function save($cascade = null, $use_transaction = false) } $this->unfreeze(); - $this->_update_original(); - $this->observe('after_save'); $use_transaction and $db->commit_transaction(); @@ -1462,6 +1460,9 @@ protected function update() return false; } + $this->_original = $this->_data; + static::$_cached_objects[get_class($this)][static::implode_pk($this)] = $this; + // update the original property on success $this->observe('after_update');