Last modified: 2010-05-15 15:48:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8858 - If $wgImageLimits is less than three it crashes
If $wgImageLimits is less than three it crashes
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
PC Windows 98
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-02-02 06:48 UTC by Invalid Account
Modified: 2010-05-15 15:48 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Invalid Account 2007-02-02 06:48:30 UTC
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.
Comment 1 Antoine "hashar" Musso (WMF) 2007-02-02 16:04:40 UTC
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.
Comment 2 Antoine "hashar" Musso (WMF) 2007-02-02 16:22:42 UTC
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
Comment 3 Invalid Account 2007-02-02 16:39:00 UTC
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.
Comment 4 Antoine "hashar" Musso (WMF) 2007-02-03 13:03:30 UTC
Open a new bug.

Note You need to log in before you can comment on or make changes to this bug.