Fix PHP8.0 error Cannot access offset of type string on string

This commit is contained in:
Hadi Nategh 2021-11-15 12:09:36 +01:00
parent 3003ed580c
commit 6d2a4bfc05

View File

@ -94,7 +94,7 @@ class home_favorite_portlet extends home_portlet
$need_reload = true; $need_reload = true;
} }
$this->favorite = $context['favorite']; $this->favorite = (array)$context['favorite'];
$this->title = lang($context['appname']) . ': ' . $this->favorite['name']; $this->title = lang($context['appname']) . ': ' . $this->favorite['name'];
$this->context = $context; $this->context = $context;
if($this->favorite) if($this->favorite)