check for null passed as folder to getFolderList()

This commit is contained in:
Uwe Steinmann 2021-07-14 12:00:47 +02:00
parent d4b05b61f2
commit 55a7667c1e
2 changed files with 10 additions and 0 deletions

View File

@ -2803,6 +2803,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
* @return string * @return string
*/ */
function getListRowPath($object) { /* {{{ */ function getListRowPath($object) { /* {{{ */
if(!$object)
return '';
$belowtitle = ''; $belowtitle = '';
$folder = $object->getParent(); $folder = $object->getParent();
if($folder) { if($folder) {
@ -3042,6 +3044,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$accessop = $this->params['accessobject']; $accessop = $this->params['accessobject'];
$onepage = $this->params['onepage']; $onepage = $this->params['onepage'];
if(!$subFolder)
return '';
$owner = $subFolder->getOwner(); $owner = $subFolder->getOwner();
$comment = $subFolder->getComment(); $comment = $subFolder->getComment();
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";

View File

@ -2868,6 +2868,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
* @return string * @return string
*/ */
function getListRowPath($object) { /* {{{ */ function getListRowPath($object) { /* {{{ */
if(!$object)
return '';
$belowtitle = ''; $belowtitle = '';
$folder = $object->getParent(); $folder = $object->getParent();
if($folder) { if($folder) {
@ -3113,6 +3115,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$accessop = $this->params['accessobject']; $accessop = $this->params['accessobject'];
$onepage = $this->params['onepage']; $onepage = $this->params['onepage'];
if(!$subFolder)
return '';
$owner = $subFolder->getOwner(); $owner = $subFolder->getOwner();
$comment = $subFolder->getComment(); $comment = $subFolder->getComment();
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";