fix php 4 error

This commit is contained in:
John Bintz 2009-11-12 21:33:15 -05:00
parent 5dd32446d5
commit 01d5850cb4
1 changed files with 6 additions and 1 deletions

View File

@ -23,7 +23,12 @@ class ComicPressDBInterface {
}
function _get_categories_to_exclude($category = null) {
return (is_null($category)) ? $this->_non_comic_categories : array_values(array_diff($this->_all_categories, array($category)));
$result = array_diff($this->_all_categories, array($category));
if (is_array($result)) {
return (is_null($category)) ? $this->_non_comic_categories : array_values($result);
} else {
return $this->_non_comic_categories;
}
}
/**