Fix input check to work with numeric calendar IDs from database (#3835)
This commit is contained in:
parent
7c0217e88f
commit
5dbd509af5
1 changed files with 2 additions and 2 deletions
|
@ -795,8 +795,8 @@ class database_driver extends calendar_driver
|
||||||
{
|
{
|
||||||
if (empty($calendars))
|
if (empty($calendars))
|
||||||
$calendars = array_keys($this->calendars);
|
$calendars = array_keys($this->calendars);
|
||||||
else if (is_string($calendars))
|
else if (!is_array($calendars))
|
||||||
$calendars = explode(',', $calendars);
|
$calendars = explode(',', strval($calendars));
|
||||||
|
|
||||||
// only allow to select from calendars of this use
|
// only allow to select from calendars of this use
|
||||||
$calendar_ids = array_map(array($this->rc->db, 'quote'), array_intersect($calendars, array_keys($this->calendars)));
|
$calendar_ids = array_map(array($this->rc->db, 'quote'), array_intersect($calendars, array_keys($this->calendars)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue