Commit 679afe62fc2b95bf9f3834feb6586964939f346c

Authored by kevin_fourie
1 parent ecbba033

KTC-20

"Fatal error on dashboard after deleting the target folder of a quick link and then navigating back to the dashboard"
Fixed.

Reviewed By: Conrad 


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@6356 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/permissions/permissionutil.inc.php
@@ -399,6 +399,9 @@ class KTPermissionUtil { @@ -399,6 +399,9 @@ class KTPermissionUtil {
399 if (PEAR::isError($oPermission)) { 399 if (PEAR::isError($oPermission)) {
400 return false; 400 return false;
401 } 401 }
  402 + if (PEAR::isError($oFolderOrDocument) || $oFolderOrDocument == null) {
  403 + return false;
  404 + }
402 $oPL = KTPermissionLookup::get($oFolderOrDocument->getPermissionLookupID()); 405 $oPL = KTPermissionLookup::get($oFolderOrDocument->getPermissionLookupID());
403 $oPLA = KTPermissionLookupAssignment::getByPermissionAndLookup($oPermission, $oPL); 406 $oPLA = KTPermissionLookupAssignment::getByPermissionAndLookup($oPermission, $oPL);
404 if (PEAR::isError($oPLA)) { 407 if (PEAR::isError($oPLA)) {