Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: anunja on 25 March 2019, 14:51:44

Title: Error on PHP 7.2
Post by: anunja on 25 March 2019, 14:51:44
Hallo!
I've got an error while running PHP 7.2 with Alexandria Book Library 3.1.4

Warning: count(): Parameter must be an array or an object that implements Countable in /home/users/j/j899766/domains/old-rus.imli.ru/components/com_abook/helpers/icon.php on line 104

When I degrade to 7.1 everything is OK
Title: Re: Error on PHP 7.2
Post by: federica on 05 April 2019, 10:31:02
Hi anunja,
when this error occours? Does this error happen when the category does not have a parent category or anyway?

Try to modify components/com_abook/helpers/icon.php line 104
from:
$n=count($category_parent);
to:
$n=is_array($category_parent)?count($category_parent):0;