Merge pull request #2452 from totten/lolas-freeform-CRM-14126
[civicrm-core.git] / api / v3 / Generic.php
index f02af9ed9dd454b748efa19bdb2094af61f3c67b..3c4fc8a189947e6261c6931d4ecbd2533f9520ec 100644 (file)
@@ -187,7 +187,7 @@ function civicrm_api3_generic_getvalue($apiRequest) {
   }
 
   // we only take "return=" as valid options
-  if (CRM_Utils_Array::value('return', $apiRequest['params'])) {
+  if (!empty($apiRequest['params']['return'])) {
     if (!isset($result['values'][0][$apiRequest['params']['return']])) {
       return civicrm_api3_create_error("field " . $apiRequest['params']['return'] . " unset or not existing", array('invalid_field' => $apiRequest['params']['return']));
     }