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
*/
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) . "...";

View File

@ -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) . "...";