From 5dc318b1299260897e3d2b725af76086437654a6 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 7 Aug 2013 22:32:33 -0700 Subject: [PATCH] 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 --- CRM/Utils/API/ReloadOption.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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) { -- 2.25.1