Set the favorites to the empty array on failure
Else it will start throwing errors because null is not iteratable. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
adcc061166
commit
309ae6d9c0
|
@ -162,7 +162,7 @@ class ViewController extends Controller {
|
||||||
try {
|
try {
|
||||||
$favElements = $this->activityHelper->getFavoriteFilePaths($this->userSession->getUser()->getUID());
|
$favElements = $this->activityHelper->getFavoriteFilePaths($this->userSession->getUser()->getUID());
|
||||||
} catch (\RuntimeException $e) {
|
} catch (\RuntimeException $e) {
|
||||||
$favElements['folders'] = null;
|
$favElements['folders'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$collapseClasses = '';
|
$collapseClasses = '';
|
||||||
|
|
Loading…
Reference in New Issue