I have an unsupported addon for concrete5 which is showing this error wehen upating php 7.1 to 7.2
i have not much knowledge about php and ask if somebody have an easy soltion for the code below.
<?php
$arr_tags = array();
foreach ($pages as $page) {
$tags = $page->getAttribute('tags');
if ($tags && count($tags)) {
foreach ($tags as $tag) {
$arr_tags[] = $tag;
}
}
}
$unique_tags = array_unique($arr_tags);
$keys = array_keys($unique_tags, '');
foreach ($keys as $k) {
unset($unique_tags[$k]);
}
?>
count(): Parameter must be an array or an object that implements Countable