Commit 6e4e2a9c99388b1b27bdbcf54ce500bffac2afa3
1 parent
1590188c
Return false in getFolderPathAsArray if given folder doesn't exist.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3054 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
1 deletions
lib/foldermanagement/Folder.inc
| ... | ... | @@ -482,7 +482,9 @@ class Folder extends KTEntity { |
| 482 | 482 | function getFolderPathAsArray($iFolderID) { |
| 483 | 483 | global $default; |
| 484 | 484 | $oFolder = Folder::get($iFolderID); |
| 485 | - $aPathArray; | |
| 485 | + if ($oFolder === false) { | |
| 486 | + return false; | |
| 487 | + } | |
| 486 | 488 | if (strlen($oFolder->sParentFolderIDs) > 0) { |
| 487 | 489 | if (strlen($oFolder->sParentFolderIDs) > 1) { |
| 488 | 490 | $aPathArray = explode(",",$oFolder->sParentFolderIDs); | ... | ... |