Closed GoogleCodeExporter closed 8 years ago
I was able to fix the problem (but not it's root) by changing the following:
nggfunctions.php, line 506:
if ($subalbum->previewpic > 0)
$image = $nggdb->find_image( $subalbum->previewpic );
to
if ($subalbum->previewpic > 0){
$image = $nggdb->find_image( $subalbum->previewpic );
}
else{
unset($image);
}
It looks like $image object is not being reset between iterations. Therefore,
even if there is $subalbum->previewpic is zero, the following line (same file)
$galleries[$key]->previewurl = isset($image->thumbURL) ? $image->thumbURL : '';
still uses previously created $image object.
What I also find strange is that album-extend.php has hard-coded img tag for
preview - without trying to find out, whether there is a preview file at all.
Original comment by mrskh...@gmail.com
on 7 Jun 2011 at 7:02
Thanks for the report , I will look into this..
Original comment by alex.cologne
on 12 Jun 2011 at 9:52
What's the latest on this?
Original comment by nicdiens...@gmail.com
on 19 Oct 2011 at 6:54
I have been looking into this bug report and can confirm that it exists. The
proposed code changes also fixes the problem.
I have taken a slightly different approach and have attached a patch which have
the same functionality.
Original comment by kristian...@gmail.com
on 3 Feb 2012 at 6:54
Attachments:
THX , done in r1065
Original comment by alex.cologne
on 5 Feb 2012 at 5:07
Original issue reported on code.google.com by
mrskh...@gmail.com
on 7 Jun 2011 at 6:38