From 304a41de19ef0852ae325b8ddcf8392d938db65f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 24 Aug 2016 12:34:55 +0200 Subject: [PATCH] * Calendar: fix PHP Fatal: Unsupported operand types caused eg. by deleted resources --- calendar/inc/class.calendar_owner_etemplate_widget.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 0efbae92e3..2d2252a45f 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -82,9 +82,9 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist if(!is_numeric($owner)) { $resource = $bo->resources[substr($owner, 0,1)]; - if($resource['info']) + if($resource['info'] && !($info = $bo->resource_info($owner))) { - $info = $bo->resource_info($owner); + continue; // ignore that resource, we would get a PHP Fatal: Unsupported operand types } } else if (!in_array($owner, array_keys($accounts))) @@ -140,7 +140,7 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist $bo = new calendar_bo(); $query = $_REQUEST['query']; - + // Arbitrarily limited to 50 / resource $options = array('start' => 0, 'num_rows' => 50) + array_diff_key($_REQUEST, array_flip(array('menuaction','query')));