Smarty API - Fix undefined index warning
authorColeman Watts <coleman@civicrm.org>
Sun, 29 Dec 2013 04:35:25 +0000 (20:35 -0800)
committerColeman Watts <coleman@civicrm.org>
Sun, 29 Dec 2013 04:35:25 +0000 (20:35 -0800)
CRM/Core/Smarty/plugins/function.crmAPI.php

index caa2aa751b22314b18178d1900f5ceddccafcbda..44167bc0a1251d24ec164bbf1f62f1f3eb2ba19d 100644 (file)
@@ -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"]);
   }