issue 1019 add exception that user write a post with empty category

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10463 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-03-23 01:28:11 +00:00
parent 4ba3fe05ac
commit ee427d4a06

View file

@ -166,7 +166,7 @@ class documentController extends document {
// Set to 0 if the category_srl doesn't exist
if($obj->category_srl) {
$category_list = $oDocumentModel->getCategoryList($obj->module_srl);
if(!$category_list[$obj->category_srl]->grant)
if(count($category_list) > 0 && !$category_list[$obj->category_srl]->grant)
{
return new Object(-1, 'msg_not_permitted');
}