From 8e7638a3174a63ecc100e2a570b9d06c4b44bd78 Mon Sep 17 00:00:00 2001 From: gerard sychay Date: Thu, 15 Nov 2012 10:58:37 -0500 Subject: [PATCH 1/3] Fix bug where input parameters were sent as part-indexed, part associative array --- idiorm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idiorm.php b/idiorm.php index 9424d4af..7dbf9afa 100644 --- a/idiorm.php +++ b/idiorm.php @@ -1267,7 +1267,7 @@ public function save() { $query = array(); // remove any expression fields as they are already baked into the query - $values = array_diff_key($this->_dirty_fields, $this->_expr_fields); + $values = array_values(array_diff_key($this->_dirty_fields, $this->_expr_fields)); if (!$this->_is_new) { // UPDATE // If there are no dirty values, do nothing @@ -1493,4 +1493,4 @@ protected function _str_replace_outside_quotes_cb($matches) { /** * A placeholder for exceptions eminating from the IdiormString class */ - class IdiormStringException extends Exception {} \ No newline at end of file + class IdiormStringException extends Exception {} From 5091b82652ccb974c79d1ba903fad2c681cee458 Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Thu, 15 Nov 2012 16:52:47 +0000 Subject: [PATCH 2/3] Add release change log --- README.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.markdown b/README.markdown index 968e722b..427f6bb9 100644 --- a/README.markdown +++ b/README.markdown @@ -25,6 +25,10 @@ Features Changelog --------- +#### 1.2.2 - release 2012-11-15 + +* Fix bug where input parameters were sent as part-indexed, part associative + #### 1.2.1 - release 2012-11-15 * Fix minor bug caused by IdiormStringException not extending Exception From 2237d7371c26013740ae479ccf1f3cc8c57fd1fa Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Wed, 28 Nov 2012 10:44:18 +0000 Subject: [PATCH 3/3] Remove 5.3 static call. Closes issue #78 --- README.markdown | 4 ++++ idiorm.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 427f6bb9..dcad3a41 100644 --- a/README.markdown +++ b/README.markdown @@ -25,6 +25,10 @@ Features Changelog --------- +#### 1.2.3 - release 2012-11-28 + +* Fix issue #78 - remove use of PHP 5.3 static call + #### 1.2.2 - release 2012-11-15 * Fix bug where input parameters were sent as part-indexed, part associative diff --git a/idiorm.php b/idiorm.php index 7dbf9afa..9d1f8c45 100644 --- a/idiorm.php +++ b/idiorm.php @@ -1417,7 +1417,7 @@ public static function value($subject) { * @return string */ public static function str_replace_outside_quotes($search, $replace, $subject) { - return static::value($subject)->replace_outside_quotes($search, $replace); + return self::value($subject)->replace_outside_quotes($search, $replace); } /**