From 39b1203e9a67b3b752377ad0893b571987be0644 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 8 Oct 2011 21:34:18 -0400 Subject: [PATCH] Making modParams work with non-array values. All but true, false, null will replace the parameter now. This allows modification of string and object parameters. --- lib/Cake/Utility/ObjectCollection.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Cake/Utility/ObjectCollection.php b/lib/Cake/Utility/ObjectCollection.php index cb558548b..333d24138 100644 --- a/lib/Cake/Utility/ObjectCollection.php +++ b/lib/Cake/Utility/ObjectCollection.php @@ -117,7 +117,7 @@ abstract class ObjectCollection { (is_array($options['breakOn']) && in_array($result, $options['breakOn'], true))) ) { return $result; - } elseif ($options['modParams'] !== false && is_array($result)) { + } elseif ($options['modParams'] !== false && !in_array($result, array(true, false, null), true)) { $params[$options['modParams']] = $result; } } @@ -303,5 +303,4 @@ abstract class ObjectCollection { } return $normal; } - }