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

@ -435,13 +435,16 @@ class documentAdminController extends document
$oCacheHandler = &CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
foreach($document_srl_list as $document_srl)
if(is_array($document_srl_list))
{
$cache_key = 'object:'.$document_srl;
$oCacheHandler->delete($cache_key);
$cache_key_item = 'object_document_item:'.$document_srl;
$oCacheHandler->delete($cache_key_item);
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
foreach($document_srl_list as $document_srl)
{
$cache_key = 'object:'.$document_srl;
$oCacheHandler->delete($cache_key);
$cache_key_item = 'object_document_item:'.$document_srl;
$oCacheHandler->delete($cache_key_item);
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
}
}
$oCacheHandler->invalidateGroupKey('documentList');
}