From 7ebee129d2ffa486dc2ada913327a9f7e00d81e5 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 16 Jul 2015 14:14:44 +1200 Subject: [PATCH] CRM-16851 enforce array type --- CRM/Utils/API/MatchOption.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/API/MatchOption.php b/CRM/Utils/API/MatchOption.php index 25235b6d57..8a68f153ed 100644 --- a/CRM/Utils/API/MatchOption.php +++ b/CRM/Utils/API/MatchOption.php @@ -79,9 +79,10 @@ class CRM_Utils_API_MatchOption implements API_Wrapper { * @inheritDoc */ public function fromApiInput($apiRequest) { + // Parse options.match or options.match-mandatory $keys = NULL; // array of fields to match against - if (isset($apiRequest['params'], $apiRequest['params']['options'])) { + if (isset($apiRequest['params'], $apiRequest['params']['options']) && is_array($apiRequest['params']['options'])) { if (isset($apiRequest['params']['options']['match-mandatory'])) { $isMandatory = TRUE; $keys = $apiRequest['params']['options']['match-mandatory']; -- 2.25.1