Totally Zenned
- Join Date:
- Apr 2009
- Posts:
- 507
- Plugin Contributions:
- 1
PHP Warning: A non-numeric value encountered in categories_ul_generator.php line 73
[Note: ZC version 1.5.5.f, , PHP version 7.2, etc ]
I think you have fixed this bug in 1.5.6. But was reading the php manual as I think the warning occoured as a result of moving from 7.0 to 7.2. Have same issue in 7.1.
In 1.5.6 you have inserted php $level = (int)$level; in \includes\classes\categories_ul_generator.php line 58 to change the '' string that you have to 0 (zero) the manual suggest that casting a string to integer if fine if it contains numbers however it suggest the any other behaviour could change without warning. Could i suggest that perhaps you should consider changing the call in the same module line 86 from```php
function buildTree($submenu=false)
{
return $this->buildBranch($this->root_category_id, '', $submenu);
}
to ```php
function buildTree($submenu=false)
{
return $this->buildBranch($this->root_category_id, NULL, $submenu);
}
this appears to solve the issue.
Regards
Mark