mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
check if document != null
This commit is contained in:
parent
41584479b7
commit
02a0ef95f9
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user