handle warning on cat_id when it is not a string, as expected on explode but already an array of cat-ids

This commit is contained in:
Klaus Leithoff 2012-02-07 14:10:34 +00:00
parent 5b81fca2f1
commit 34502fc66f

View File

@ -167,7 +167,7 @@ class calendar_uiviews extends calendar_ui
$this->owner = str_replace('%2C',',',$this->owner);
$this->search_params = array(
'start' => $this->date,
'cat_id' => $this->cat_id ? explode(',',$this->cat_id) : 0,
'cat_id' => $this->cat_id ? (is_array($this->cat_id)?$this->cat_id:explode(',',$this->cat_id)) : 0,
'users' => explode(',',$this->owner),
'filter' => $this->filter,
'daywise' => True,