From: Coleman Watts Date: Sun, 29 Dec 2013 04:35:25 +0000 (-0800) Subject: Smarty API - Fix undefined index warning X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9df356228c5281e3f8d883fd27228e373495cfb5;p=civicrm-core.git Smarty API - Fix undefined index warning --- diff --git a/CRM/Core/Smarty/plugins/function.crmAPI.php b/CRM/Core/Smarty/plugins/function.crmAPI.php index caa2aa751b..44167bc0a1 100644 --- a/CRM/Core/Smarty/plugins/function.crmAPI.php +++ b/CRM/Core/Smarty/plugins/function.crmAPI.php @@ -61,7 +61,7 @@ function smarty_function_crmAPI($params, &$smarty) { return; } - if (array_key_exists('is_error', $result) && $result['is_error']) { + if (!empty($result['is_error'])) { $smarty->trigger_error("{crmAPI} ".$result["error_message"]); }