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:
Roeland Jago Douma 2018-07-26 15:14:28 +02:00
parent adcc061166
commit 309ae6d9c0
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 1 deletions

View File

@ -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 = '';