From 764e368dc3b8b5ccba866c5606efdb7734d602ce Mon Sep 17 00:00:00 2001 From: Gombos Lorand Date: Thu, 5 Dec 2013 12:03:07 +0200 Subject: [PATCH] Check if the item is an array. --- lib/Cake/Utility/Hash.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Utility/Hash.php b/lib/Cake/Utility/Hash.php index 697b3df98..630e82062 100644 --- a/lib/Cake/Utility/Hash.php +++ b/lib/Cake/Utility/Hash.php @@ -130,7 +130,7 @@ class Hash { if ($conditions) { $filter = array(); foreach ($next as $item) { - if (self::_matches($item, $conditions)) { + if (is_array($item) && self::_matches($item, $conditions)) { $filter[] = $item; } }