From 55a7667c1e08054223ccd57542fd375319098350 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 14 Jul 2021 12:00:47 +0200 Subject: [PATCH] check for null passed as folder to getFolderList() --- views/bootstrap/class.Bootstrap.php | 5 +++++ views/bootstrap4/class.Bootstrap4.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 37ee0fe2d..0785faf8e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2803,6 +2803,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) * @return string */ function getListRowPath($object) { /* {{{ */ + if(!$object) + return ''; $belowtitle = ''; $folder = $object->getParent(); if($folder) { @@ -3042,6 +3044,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $accessop = $this->params['accessobject']; $onepage = $this->params['onepage']; + if(!$subFolder) + return ''; + $owner = $subFolder->getOwner(); $comment = $subFolder->getComment(); if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 512cd011d..8fe563fcf 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -2868,6 +2868,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) * @return string */ function getListRowPath($object) { /* {{{ */ + if(!$object) + return ''; $belowtitle = ''; $folder = $object->getParent(); if($folder) { @@ -3113,6 +3115,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $accessop = $this->params['accessobject']; $onepage = $this->params['onepage']; + if(!$subFolder) + return ''; + $owner = $subFolder->getOwner(); $comment = $subFolder->getComment(); if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";