mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 15:26:10 -06:00
parent category fixed on null
This commit is contained in:
parent
b61c6544ae
commit
e8f79764fe
@ -26,14 +26,16 @@ 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 ($parCat->parent_category_id == "") {
|
if (isset($parCat)) {
|
||||||
if ($type == "add_main")
|
if ($parCat->parent_category_id == "") {
|
||||||
$catNames[] = $parCat->name;
|
if ($type == "add_main")
|
||||||
break;
|
$catNames[] = $parCat->name;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$catNames[] = $parCat->name;
|
||||||
|
$cat_ids[] = $parCat->id;
|
||||||
|
$subCat = $parCat->parent_category_id;
|
||||||
}
|
}
|
||||||
$catNames[] = $parCat->name;
|
|
||||||
$cat_ids[] = $parCat->id;
|
|
||||||
$subCat = $parCat->parent_category_id;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($type == 'category_ids') {
|
if ($type == 'category_ids') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user