mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-12 16:26:07 -06:00
parent category fixed on null
This commit is contained in:
parent
b61c6544ae
commit
e8f79764fe
@ -26,6 +26,7 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||
if ($subCat != null) {
|
||||
for ($i = 0; $i < 7; $i++) {
|
||||
$parCat = $this->getCat($subCat);
|
||||
if (isset($parCat)) {
|
||||
if ($parCat->parent_category_id == "") {
|
||||
if ($type == "add_main")
|
||||
$catNames[] = $parCat->name;
|
||||
@ -36,6 +37,7 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||
$subCat = $parCat->parent_category_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($type == 'category_ids') {
|
||||
return CategoryModel::query()
|
||||
->whereIn('cats_category.id', $cat_ids)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user