Not all sidebar entries have the "classes" attribute

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2018-07-26 15:05:00 +02:00
parent adcc061166
commit 68ba96a7d5
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
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']) ?>"