Page MenuHomePhabricator

ApiQueryImageInfo.php should wfSuppressErrors() before trying to unserialize
Closed, ResolvedPublic

Description

Author: info

Description:
Hi,

my error_log is flooded with the following:

[error] PHP Notice: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 0 of 1 bytes in /path/to/pool/wiki/includes/api/ApiQueryImageInfo.php on line 382.

My software: MediaWiki 1.18.2, PHP 5.2.17 (apache), MySQL 5.1.54-log, OpenBSD 4.9.

I'm running 9 language wikis and one pool wiki and the error appears on the pool wiki.

Any suggestions are more than appreciated!

Thanks and cheers,

Till


Version: 1.18.x
Severity: normal

Details

Reference
bz35693

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:20 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz35693.
bzimport added a subscriber: Unknown Object (MLST).

Technical version:

Api should be doing wfSuppressErrors before trying to blindly unserialize, and/or possibly passing through to the relavent media handler's isMetadataValid method first.

info wrote:

Hi,

I just upgraded to MediaWiki 1.19.0 and I still have that error, except now it's on line 376 (yay!):

[error] PHP Notice: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 0 of
1 bytes in /path/to/pool/wiki/includes/api/ApiQueryImageInfo.php on line 376.

Any ideas how to fix this?

Thanks + cheers,

Till

Bryan.TongMinh wrote:

I7c9649b5