Does anybody have idea why I get blank page when using var_dump()
?
In the Joomla global config I set up showing errors too. (checked with phpinfo()
and the local values are on too)
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$widget_id = $widget->id.'-'.uniqid();
$settings = $widget->settings;
// var_dump($settings);
// if I uncomment the line above, works fine
$sets = array_chunk($widget->items, $settings['items_per_set']);
// var_dump($sets);
// if I uncomment the line above
// and not using the the foreach below
// blank page appears
foreach ($sets as $set => $items){
var_dump($items);
// this line above causes blank page
}
foreach (array_keys($sets) as $s) {
$nav[] = '<li><span></span></li>';
}
$i = 0;
?>
Thank you.
Save $items into another variable. Try this