One more PHP7 warning in calendar plugin code (Bifrost#T31309)

This commit is contained in:
Aleksander Machniak 2017-05-10 12:54:57 +02:00
parent 1b801e3d0e
commit ad40d615b1

View file

@ -124,7 +124,7 @@ class kolab_user_calendar extends kolab_calendar
/**
* Return color to display this calendar
*/
public function get_color()
public function get_color($default = null)
{
// calendar color is stored in local user prefs
$prefs = $this->cal->rc->config->get('kolab_calendars', array());
@ -132,7 +132,7 @@ class kolab_user_calendar extends kolab_calendar
if (!empty($prefs[$this->id]) && !empty($prefs[$this->id]['color']))
return $prefs[$this->id]['color'];
return 'cc0000';
return $default ?: 'cc0000';
}
/**