If $wgImageLimits is less than three it crashes
Closed, ResolvedPublic


Author: dodgy

This works fine:
$wgImageLimits = array (
array(800,600) );

But less than two options crashes

This crashes:
$wgImageLimits = array (
array(800,600) );

So does this:
$wgImageLimits = array ( array(800,600) );

The error happens when one views an "Image:" page (image namespace)

"Division by zero" in "ImagePage.php on line 205"

Then two "Warning: Cannot modify header information - headers already sent by " on "WebResponse.php on
line 9"

Also the image in the Image: namespace doesn't show, but clicking on the link will view it.

Version: 1.9.x
Severity: normal
OS: Windows 98
Platform: PC

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz8858.
bzimport created this task.Via LegacyFeb 2 2007, 6:48 AM
hashar added a comment.Via ConduitFeb 2 2007, 4:04 PM

The user preference save an offset in the array, in your case the
offset is out of the array. We should save the (x,y) couple instead.

hashar added a comment.Via ConduitFeb 2 2007, 4:22 PM

When tweaking $wgImageLimits, the default preference should be changed too.


$wgImageLimits = array(


$wgDefaultUserOptions['imagesize'] = 0;

Anyway, I added a check in image page to make sure the offset actually exist
and default to the last offset if not. I also added some documentation in

Fixed in r19725

bzimport added a comment.Via ConduitFeb 2 2007, 4:39 PM

dodgy wrote:

Ah, you know that would be nice if I removed as skin as a selectable skin that it would get it out of
user preferences, too.

hashar added a comment.Via ConduitFeb 3 2007, 1:03 PM

Open a new bug.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.