generalize BitmapHandler::logErrorForExternalProcess
authorAntoine Musso <hashar@free.fr>
Wed, 4 Dec 2013 16:28:12 +0000 (17:28 +0100)
committerAntoine Musso <hashar@free.fr>
Fri, 6 Dec 2013 17:21:58 +0000 (18:21 +0100)
commit96ddd951fb7047607fc7347d18e28588ec974c5c
treeb0e143935ec5573713827d6bb10cf7e4918d600b
parent6f9ba4d2c4b5d0dd383974bc85fb072167fdf24b
generalize BitmapHandler::logErrorForExternalProcess

BitmapHandler::logErrorForExternalProcess is a wrapper around
wfDebugLog( 'thumbnail' ). It got copy pasted from some other class at
one point.

This patch move the method up to general class MediaHandler and makes
other child class uses it.  The method will thus be available to
extensions such as TimedMediaHandler.

The reason I am doing that is that trim($err) generates a copy of $err
which causes a memory allocation fatal error whenever $err is larger
than the remaining memory allocatable.  The patch will let us fix the
bug by only altering one part of the code.

bug: 57985
Change-Id: I5657f07d6e2cca05d53f2a5c30ec23622c171343
includes/media/Bitmap.php
includes/media/DjVu.php
includes/media/MediaHandler.php
includes/media/SVG.php