Last modified: 2014-06-23 16:07:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49464, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47464 - Undefined offset notice in ImageGallery.php if &fileuntil=xxx.yyy is appended on Category: pages
Undefined offset notice in ImageGallery.php if &fileuntil=xxx.yyy is appended...
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
1.21.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
https://commons.wikimedia.org/wiki/Us...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-21 01:35 UTC by 02388338eeab
Modified: 2014-06-23 16:07 UTC (History)
3 users (show)

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


Attachments

Description 02388338eeab 2013-04-21 01:35:45 UTC
Specs:
5.4.6-1ubuntu1.2 (fpm-fcgi) - MW 1.20.4 - 10.0.1-MariaDB-mariadb1~quantal-log - Nginx 1.2.1-2.2 - pear.php.net/PEAR-1.9.4 - imagemagick 8:6.7.7.10-2ubuntu4

Error Message:

2013/04/20 14:39:51 [error] 23509#0: *595 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined offset: 3 in /wiki/includes/ImageGallery.php on line 267
PHP message: PHP Notice:  Undefined offset: 3 in /wiki/includes/ImageGallery.php on line 267
PHP message: PHP Notice:  Undefined offset: 3 in /wiki/includes/ImageGallery.php on line 267
...
Comment 1 Andre Klapper 2013-04-22 08:39:29 UTC
Thanks for reporting this.

General info: To get better debug information on PHP messages, see http://www.mediawiki.org/wiki/Manual:How_to_debug#PHP_errors
Comment 2 02388338eeab 2013-04-23 12:12:40 UTC
Hi,

this error happens only on one Category: (only images) site.
The logfiles of mediawiki shows nothing special "Request ended normally" all image thumbnails in this category show correctly.

Seems like this was an error on my site.
Comment 3 02388338eeab 2013-04-23 12:32:34 UTC
(In reply to comment #2)
> Hi,
> 
> this error happens only on one Category: (only images) site.
> The logfiles of mediawiki shows nothing special "Request ended normally" all
> image thumbnails in this category show correctly.
> 
> Seems like this was an error on my site.

I figured it out.
First: I'm not the only one: https://www.google.de/search?q=Undefined+offset%3A+3+in+includes%2FImageGallery.php+on+line+267&ie=utf-8
Second: This happanes if in a image category &fileuntil=xxx.yyy is appended.

Don't know why. Wiki returns no error. Only php's notice.
Comment 4 [[kgh]] 2013-09-27 17:20:57 UTC
I am getting the exact same PHP notice on MW 1.20.7 with PHP 5.3.3 and MySQL 5.1.66 on Apache 2.2.16
Comment 5 S. Piccardi 2013-12-04 11:13:42 UTC
I can confirm this error. 

I'm using standard Debian packages for Apache, PHP, memcache, apc. From Mediawiki version page I have:


MediaWiki 	1.21.2
PHP 	5.3.3-7+squeeze17 (apache2handler)
MySQL 	5.1.66-0+squeeze1-log


What I find in the error log is:

[Wed Dec 04 11:46:26 2013] [error] [client 217.133.96.194] PHP Notice:  Undefined offset: 3 in /var/www/fountainpen.it/mediawiki/includes/ImageGallery.php on line 266

I got this asking for something like:

http://www.fountainpen.it/index.php?title=Categoria:Waterman_Ads&fileuntil=1916-Waterman-4x.jpg.

It happen always when having a category for images with more that 200 images. First you have to go in the second page page by the "next 200" link, then going backby the "previous 200" triggers the error.
Comment 6 Andre Klapper 2014-04-23 17:14:18 UTC
The line the notice refers to is the very last line in:
# Output each image...
foreach ( $this->mImages as $pair ) {
	$nt = $pair[0];
	$text = $pair[1]; # "text" means "caption" here
	$alt = $pair[2];
	$link = $pair[3];
Comment 7 Bawolff (Brian Wolff) 2014-04-23 18:35:22 UTC
Is this still present on 1.23 ? (I vaugely remember fixing this. Id check myself but only have my phone for the next little while)
Comment 8 S. Piccardi 2014-05-07 13:51:50 UTC
I checked on 1.22.6 and it seems resolved. Cannot test 1.23 until is released as stable.
Comment 9 Andre Klapper 2014-06-10 11:40:02 UTC
Let's assume it's been fixed (comment 7 and comment 8) in the meantime.

Please reopen if somebody can still reproduce the problem in 1.23.

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


Navigation
Links