CRM-19907 Fix error where show events setting is NULL
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 23 Jan 2017 02:34:56 +0000 (02:34 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 23 Jan 2017 02:42:21 +0000 (02:42 +0000)
CRM/Event/BAO/Event.php

index 0be1b5cb74499b226299c236ea5785d940658140..c1e9c35a28ef8277b9a7ca099aa4acbbf65a895e 100644 (file)
@@ -386,7 +386,7 @@ WHERE      civicrm_event.is_active = 1 AND
     // Get the event summary display preferences
     $show_max_events = Civi::settings()->get('show_events');
     // show all events if show_events is set to a negative value
-    if ($show_max_events >= 0) {
+    if (isset($show_max_events) && $show_max_events >= 0) {
       $event_summary_limit = "LIMIT      0, $show_max_events";
     }
     else {