Since i'm in PHP 5.6, i have this warning (not in PHP 5.2) :
PHP Strict Standards: Only variables should be passed by reference in blockcategories_top.php on line 157
Here is the line 157 :
line 155 if ($cookie->last_visited_category) {
line 156 $c = new Category(intval($cookie->last_visited_category));
line 157 $oldies = array_pop($c->getParentsCategories());
line 158 $oldies = $oldies['id_category'];
line 159 $smarty->assign('oldies', $oldies);
line 160 }
Please, how can i fix it ? :)
Thanks !
Just replace
$oldies = array_pop($c->getParentsCategories());
with
$oldies = $c->getParentsCategories();
$oldies = array_pop($oldies);
The warning happens because array_pop expects the parameter to be a reference, and function return values are not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With