Using latest version on XAMPP i faced below warning on my joomla:
Warning: Creating default object from empty value in F:\xampp\htdocs\modules\mod_random_image_with_fancy_zoom\tmpl\default.php on line 26
usually this was fixed by explicit definition of new variables, however this time i could not find what to be changed to fix this warning?
$pickoneArray = array();
$pickone = rand(0, count($images)-1);
print_r($pickoneArray);
print_r($images[$pickone]);
$pickoneArray[0]->name = $images[$pickone]->name; //this is line 26
$pickoneArray[0]->folder = $images[$pickone]->folder . "/";
and here is the output of print_r:
stdClass Object
(
[name] => pic001.jpg
[folder] => images\images\pic_of_the_day\
)
as you can see $pickoneArray has nothing to be displayed.
$pickoneArray = array(new StdClass());
?