Merge pull request #10406 from nextcloud/bugfix/10405/undefined-index-classes

Not all sidebar entries have the "classes" attribute
This commit is contained in:
Morris Jobke 2018-07-26 16:05:34 +02:00 committed by GitHub
commit 6514bf1e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@
* @return int Returns the pinned value
*/
function NavigationListElements($item, $l, $pinned) {
strpos($item['classes'], 'pinned') !== false ? $pinned++ : '';
strpos($item['classes'] ?? '', 'pinned') !== false ? $pinned++ : '';
?>
<li
data-id="<?php p($item['id']) ?>"