MDL-53027 calendar: Fix false empty result from calendar_get_events().
authorDavid Balch <david.balch@conted.ox.ac.uk>
Mon, 8 Feb 2016 11:42:28 +0000 (11:42 +0000)
committerCameron Ball <cameron@moodle.com>
Wed, 24 Feb 2016 10:38:25 +0000 (18:38 +0800)
calendar/lib.php

index 184997e..5126684 100644 (file)
@@ -728,8 +728,8 @@ function calendar_get_events($tstart, $tend, $users, $groups, $courses, $withdur
 
     $whereclause = '';
     $params = array();
-    // Quick test
-    if(is_bool($users) && is_bool($groups) && is_bool($courses)) {
+    // Quick test.
+    if (empty($users) && empty($groups) && empty($courses)) {
         return array();
     }