mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 23:36:08 -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) {
|
if ($subCat != null) {
|
||||||
for ($i = 0; $i < 7; $i++) {
|
for ($i = 0; $i < 7; $i++) {
|
||||||
$parCat = $this->getCat($subCat);
|
$parCat = $this->getCat($subCat);
|
||||||
|
if (isset($parCat)) {
|
||||||
if ($parCat->parent_category_id == "") {
|
if ($parCat->parent_category_id == "") {
|
||||||
if ($type == "add_main")
|
if ($type == "add_main")
|
||||||
$catNames[] = $parCat->name;
|
$catNames[] = $parCat->name;
|
||||||
@ -36,6 +37,7 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
|||||||
$subCat = $parCat->parent_category_id;
|
$subCat = $parCat->parent_category_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ($type == 'category_ids') {
|
if ($type == 'category_ids') {
|
||||||
return CategoryModel::query()
|
return CategoryModel::query()
|
||||||
->whereIn('cats_category.id', $cat_ids)
|
->whereIn('cats_category.id', $cat_ids)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user