check array before foreach loop

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12463 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-12-26 06:02:16 +00:00
parent 7760f1b5c1
commit a36935fe7d

View file

@ -434,6 +434,8 @@ class documentAdminController extends document
//remove from cache //remove from cache
$oCacheHandler = &CacheHandler::getInstance('object'); $oCacheHandler = &CacheHandler::getInstance('object');
if($oCacheHandler->isSupport()) if($oCacheHandler->isSupport())
{
if(is_array($document_srl_list))
{ {
foreach($document_srl_list as $document_srl) foreach($document_srl_list as $document_srl)
{ {
@ -443,6 +445,7 @@ class documentAdminController extends document
$oCacheHandler->delete($cache_key_item); $oCacheHandler->delete($cache_key_item);
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl); $oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
} }
}
$oCacheHandler->invalidateGroupKey('documentList'); $oCacheHandler->invalidateGroupKey('documentList');
} }
return $output; return $output;