diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 45a5d8a00..2af3c7927 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -120,7 +120,7 @@ $(document).ready( function() { if($resArr) { foreach ($resArr as $res) { $document = $dms->getDocument($res["id"]); - if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + if($document && $document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { $tasks['review'][] = array('id'=>$res['id'], 'name'=>$res['name']); } } @@ -132,7 +132,7 @@ $(document).ready( function() { if($resArr) { foreach ($resArr as $res) { $document = $dms->getDocument($res["id"]); - if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + if($document && $document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { $tasks['approval'][] = array('id'=>$res['id'], 'name'=>$res['name']); } }