From 9df356228c5281e3f8d883fd27228e373495cfb5 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 28 Dec 2013 20:35:25 -0800 Subject: [PATCH] Smarty API - Fix undefined index warning --- CRM/Core/Smarty/plugins/function.crmAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"]); } -- 2.25.1