Attempt to assign property "children" on null
Posted: 30 Aug 2023, 00:45
Hi, can I get your advice on Attempt to assign property "children" on null.
(Joomla! Version 4.3.4 PHP Version 8.2.1)
After updating Phoca Gallery from 4.5.3 to 4.5.4 if I select images in the control panel there is an error:
(It is the same when choosing Rating)
Attempt to assign property "children" on null
.../administrator/components/com_phocagallery/models/fields/phocagallerycategory.php:97
92 $categories = $db->loadObjectList('id') ?? [];
93
94 array_walk($categories, function ($category) use ($categories) {
95 if ($category->parent_id) {
96 if ($categories[$category->parent_id]->children === null)
97 $categories[$category->parent_id]->children = [];
98 $categories[$category->parent_id]->children[] = $category;
Thank you so much for your help
(Joomla! Version 4.3.4 PHP Version 8.2.1)
After updating Phoca Gallery from 4.5.3 to 4.5.4 if I select images in the control panel there is an error:
(It is the same when choosing Rating)
Attempt to assign property "children" on null
.../administrator/components/com_phocagallery/models/fields/phocagallerycategory.php:97
92 $categories = $db->loadObjectList('id') ?? [];
93
94 array_walk($categories, function ($category) use ($categories) {
95 if ($category->parent_id) {
96 if ($categories[$category->parent_id]->children === null)
97 $categories[$category->parent_id]->children = [];
98 $categories[$category->parent_id]->children[] = $category;
Thank you so much for your help