From ca9e1c8860513b3b19096d48af832b1aea2763d9 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 3c6fc7978..715a9945d 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2925,6 +2925,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) { @@ -3187,6 +3189,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 28ad6aee4..a5d3ae9b7 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -2908,6 +2908,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) { @@ -3176,6 +3178,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) . "...";