First attached file displayed as garbage
Reported in Sourceforge - https://sourceforge.net/tracker/?funh1. detailaid2780481group_ih1. 205633atid1064496
Since switching to Xoops 2.3.3, SmartSection no longer correctly displays
the list of files attached to an article. The first entry is always garbled
and has an invalid id.
It looks like it's because in item.php, in the section 'Creating the files
object associated with this item' (line 123 and onwards), $file is not
initialized. It is set halfway down the loop, but used earlier than that.
Indeed, when I add:
unset ($file);
before the loop, it works perfectly. To me this was enough for a quick fix
on my own sites but I don't know the code well enough to know whether I
didn't break anything else. And anyway you might want to fix this in the
real release. :)
The strange thing is that this uninitialized use of $file has been in
SmartSection for a long time, but the problem only becomes apparant in
Xoops 2.3.x.
Since switching to Xoops 2.3.3, SmartSection no longer correctly displays
the list of files attached to an article. The first entry is always garbled
and has an invalid id.
It looks like it's because in item.php, in the section 'Creating the files
object associated with this item' (line 123 and onwards), $file is not
initialized. It is set halfway down the loop, but used earlier than that.
Indeed, when I add:
unset ($file);
before the loop, it works perfectly. To me this was enough for a quick fix
on my own sites but I don't know the code well enough to know whether I
didn't break anything else. And anyway you might want to fix this in the
real release. :)
The strange thing is that this uninitialized use of $file has been in
SmartSection for a long time, but the problem only becomes apparant in
Xoops 2.3.x.
Leave a comment
on 2014-02-22 17:37 *
By David Janssens
Assigned to set to David Janssens
Status changed from New to Invalid
No activity for too long, no owner. Closing.