From: Aaron Schulz Date: Fri, 8 Nov 2013 19:23:17 +0000 (-0800) Subject: Clarify thumbnail log failure entries when the local file copy failed X-Git-Tag: 1.31.0-rc.0~18218 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=8d266860d6dd3e20dcbf2a633970cb915037c969;p=lhc%2Fweb%2Fwiklou.git Clarify thumbnail log failure entries when the local file copy failed Change-Id: I8ed9a5ffc04b1abd2e7b2c055dfdfb2625e89fde --- diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index e2444a11c3..43ba11786d 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -168,6 +168,13 @@ class BitmapHandler extends ImageHandler { # Transform functions and binaries need a FS source file $scalerParams['srcPath'] = $image->getLocalRefPath(); + if ( $scalerParams['srcPath'] === false ) { // Failed to get local copy + wfDebugLog( 'thumbnail', + sprintf( 'Thumbnail failed on %s: could not get local copy of "%s"', + wfHostname(), $image->getName() ) ); + return new MediaTransformError( 'thumbnail_error', + $scalerParams['clientWidth'], $scalerParams['clientHeight'] ); + } # Try a hook $mto = null;