mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-01 19:09:30 +01:00
Home: Avoid "Illegal offset type" with default favorites from 21.1
This commit is contained in:
parent
4f40ef01da
commit
b6fa739ee4
@ -90,13 +90,14 @@ class home_favorite_portlet extends home_portlet
|
||||
$favorites = Framework\Favorites::get_favorites($context['appname']);
|
||||
}
|
||||
|
||||
$this->favorite = (array)$favorites[$context['favorite'] ?: 'blank'];
|
||||
$this->favorite = is_array($context['favorite']) ? $context['favorite'] :
|
||||
(array)$favorites[$context['favorite'] ?: 'blank'];
|
||||
$this->title = lang($context['appname']) . ': ' . $this->favorite['name'];
|
||||
$this->context = $context;
|
||||
if($this->favorite)
|
||||
{
|
||||
$this->nm_settings['favorite'] = $this->context['favorite'];
|
||||
if(is_array($favorites[$context['favorite']]['state']))
|
||||
if(is_string($context['favorite']) && is_array($favorites[$context['favorite']]['state']))
|
||||
{
|
||||
$this->nm_settings += $this->favorite['state'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user