Commit b5defc9a8ae4788b676ccc92dacfb39c8748585a
1 parent
4e47d53f
fix for browse dying on missing folders.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5017 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
1 deletions
browse.php
| ... | ... | @@ -119,7 +119,9 @@ class BrowseDispatcher extends KTStandardDispatcher { |
| 119 | 119 | |
| 120 | 120 | // here we need the folder object to do the breadcrumbs. |
| 121 | 121 | $oFolder =& Folder::get($folder_id); |
| 122 | - | |
| 122 | + if (PEAR::isError($oFolder)) { | |
| 123 | + return false; // just fail. | |
| 124 | + } | |
| 123 | 125 | $oPerm = KTPermission::getByName('ktcore.permissions.write'); |
| 124 | 126 | if (KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oFolder)) { |
| 125 | 127 | $this->editable = true; | ... | ... |