From 7f4c9a036d5b4458dfcb2449f52956e7ad90cc60 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 22 Apr 2021 10:22:03 +0200 Subject: [PATCH] check if parent folder exists in getListRowPath() --- views/bootstrap/class.Bootstrap.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 8079a6f55..819fbc10c 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2753,13 +2753,16 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) * @return string */ function getListRowPath($object) { /* {{{ */ - $belowtitle = "
".getMLText('in_folder').": /"; + $belowtitle = ''; $folder = $object->getParent(); - $path = $folder->getPath(); - for ($i = 1; $i < count($path); $i++) { - $belowtitle .= htmlspecialchars($path[$i]->getName())."/"; + if($folder) { + $belowtitle .= "
".getMLText('in_folder').": /"; + $path = $folder->getPath(); + for ($i = 1; $i < count($path); $i++) { + $belowtitle .= htmlspecialchars($path[$i]->getName())."/"; + } + $belowtitle .= ""; } - $belowtitle .= "
"; return $belowtitle; } /* }}} */