return null if no folder was found by getParent()

This commit is contained in:
Uwe Steinmann 2021-09-20 16:37:10 +02:00
parent 247e8b09ca
commit 47e07ae2d1

View File

@ -347,11 +347,12 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
/** /**
* Returns the parent * Returns the parent
* *
* @return bool|SeedDMS_Core_Folder * @return null|bool|SeedDMS_Core_Folder returns null, if there is no parent folder
* and false in case of an error
*/ */
public function getParent() { /* {{{ */ public function getParent() { /* {{{ */
if ($this->_id == $this->_dms->rootFolderID || empty($this->_parentID)) { if ($this->_id == $this->_dms->rootFolderID || empty($this->_parentID)) {
return false; return null;
} }
if (!isset($this->_parent)) { if (!isset($this->_parent)) {