From 55dcb161aeb6cac9cbbfa29f4bb34ded7e429851 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 9 Sep 2018 13:59:10 -0400 Subject: [PATCH] find should always return an array --- web/includes/Event.php | 2 +- web/includes/Filter.php | 2 +- web/includes/Group.php | 2 +- web/includes/Monitor.php | 2 +- web/includes/Storage.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/includes/Event.php b/web/includes/Event.php index 2bb05bf5d..c9b3d0da5 100644 --- a/web/includes/Event.php +++ b/web/includes/Event.php @@ -532,7 +532,7 @@ class Event { $file = $backTrace[1]['file']; $line = $backTrace[1]['line']; Error("Invalid value for limit($limit) passed to Event::find from $file:$line"); - return; + return array(); } } } diff --git a/web/includes/Filter.php b/web/includes/Filter.php index f65399320..099307276 100644 --- a/web/includes/Filter.php +++ b/web/includes/Filter.php @@ -145,7 +145,7 @@ public $defaults = array( $file = $backTrace[1]['file']; $line = $backTrace[1]['line']; Error("Invalid value for limit($limit) passed to Filter::find from $file:$line"); - return; + return array(); } } } diff --git a/web/includes/Group.php b/web/includes/Group.php index 4cbdaa83b..dae1acb6a 100644 --- a/web/includes/Group.php +++ b/web/includes/Group.php @@ -91,7 +91,7 @@ class Group { $file = $backTrace[1]['file']; $line = $backTrace[1]['line']; Error("Invalid value for limit($limit) passed to Group::find from $file:$line"); - return; + return array(); } } } # end if options diff --git a/web/includes/Monitor.php b/web/includes/Monitor.php index 19aaf920b..f6ceca734 100644 --- a/web/includes/Monitor.php +++ b/web/includes/Monitor.php @@ -312,7 +312,7 @@ private $control_fields = array( $file = $backTrace[1]['file']; $line = $backTrace[1]['line']; Error("Invalid value for limit($limit) passed to Control::find from $file:$line"); - return; + return array(); } } } diff --git a/web/includes/Storage.php b/web/includes/Storage.php index bdd4bdf26..c4be3ae7e 100644 --- a/web/includes/Storage.php +++ b/web/includes/Storage.php @@ -117,7 +117,7 @@ class Storage { $file = $backTrace[1]['file']; $line = $backTrace[1]['line']; Error("Invalid value for limit($limit) passed to Control::find from $file:$line"); - return; + return array(); } } # end if limit } # end if options