Closed peterhulst closed 2 months ago
The warning should be gone with this version.
Please test
I have installed the fix and did not see the warning anymore. However the original warning with the original 5.1.0 code also didn't came up anymore. I have seen your code fix and it looks fine. Thanks.
Hello,
Today on a local Joomla installation the error still exists with, also with fix #134. I make a small modification and now it is fixed: Line: if (!isset($node->subnodes) && empty((array) ($node->subnodes))) { should be: if (!isset($node->subnodes) || empty((array) ($node->subnodes))) {
Regards, Peter
Steps to reproduce Set option: Remove duplicate menu: YES
Then (somethimes) this message is shown a few times (with error reporting: maximum): _Message: Warning: Undefined property: stdClass::$subnodes in ....components\com_schuwebsitemap\src\Model\SitemapModel.php on line 266
Expected behavior No warning message
Actual result See message above.
System information Joomla version: 4.4.4 SchuWeb-Sitemap version: 5.1.0 PHP version: 8.1.23 Database version: mysql 8.0.3