From: Tim Otten Date: Thu, 8 Aug 2013 05:32:33 +0000 (-0700) Subject: CRM-13163 - CRM_Utils_API_ReloadOption - Fix warnings/regressions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5dc318b1299260897e3d2b725af76086437654a6;p=civicrm-core.git CRM-13163 - CRM_Utils_API_ReloadOption - Fix warnings/regressions ---------------------------------------- * CRM-13163: hrjob: Display/edit dates with jQuery date picker http://issues.civicrm.org/jira/browse/CRM-13163 --- diff --git a/CRM/Utils/API/ReloadOption.php b/CRM/Utils/API/ReloadOption.php index 0c6600ad65..92e9e55b0b 100644 --- a/CRM/Utils/API/ReloadOption.php +++ b/CRM/Utils/API/ReloadOption.php @@ -71,15 +71,11 @@ class CRM_Utils_API_ReloadOption implements API_Wrapper { * {@inheritDoc} */ public function toApiOutput($apiRequest, $result) { - if ($result['is_error']) { - return $result; - } - + $reloadMode = NULL; if ($apiRequest['action'] === 'create' && isset($apiRequest['params'], $apiRequest['params']['options'], $apiRequest['params']['options']['reload'])) { - $reloadMode = $apiRequest['params']['options']['reload']; - } - else { - $reloadMode = NULL; + if (!CRM_Utils_Array::value('is_error', $result, FALSE)) { + $reloadMode = $apiRequest['params']['options']['reload']; + } } switch ($reloadMode) {