From: Eileen McNaughton Date: Thu, 16 Jul 2015 02:14:44 +0000 (+1200) Subject: CRM-16851 enforce array type X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7ebee129d2ffa486dc2ada913327a9f7e00d81e5;p=civicrm-core.git CRM-16851 enforce array type --- 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'];