CRM-20775 Wrong is full results for API event get
authorfrancescbassas <francesc@babu.cat>
Tue, 27 Jun 2017 10:52:52 +0000 (12:52 +0200)
committerGitHub <noreply@github.com>
Tue, 27 Jun 2017 10:52:52 +0000 (12:52 +0200)
api/v3/Event.php

index 500d0ed6a63d9e118d9963c81c79cba836331b42..5cae5b057404e3055ffe905e9abd383199464fe4 100644 (file)
@@ -208,6 +208,9 @@ function _civicrm_api3_event_getisfull(&$event, $event_id) {
   if (!empty($eventFullResult) && is_int($eventFullResult)) {
     $event[$event_id]['available_places'] = $eventFullResult;
   }
+  else if (is_null($eventFullResult)) {
+    return $event[$event_id]['is_full'] = 0;
+  }
   else {
     $event[$event_id]['available_places'] = 0;
   }