For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
Index: trunk/phase3/includes/Image.php =================================================================== --- trunk/phase3/includes/Image.php (revision 14411) +++ trunk/phase3/includes/Image.php (revision 14412) @@ -1011,6 +1011,10 @@ $this->lastError = $this->reallyRenderThumb( $thumbPath, $width, $height ); if ( $this->lastError === true ) { $done = true; + } elseif( $GLOBALS['wgIgnoreImageErrors'] ) { + // Log the error but output anyway. + // With luck it's a transitory error... + $done = true; } # Purge squid Index: trunk/phase3/includes/DefaultSettings.php =================================================================== --- trunk/phase3/includes/DefaultSettings.php (revision 14411) +++ trunk/phase3/includes/DefaultSettings.php (revision 14412) @@ -1326,6 +1326,18 @@ */ $wgThumbnailEpoch = '20030516000000'; +/** + * If set, inline scaled images will still produce <img> tags ready for + * output instead of showing an error message. + * + * This may be useful if errors are transitory, especially if the site + * is configured to automatically render thumbnails on request. + * + * On the other hand, it may obscure error conditions from debugging. + * Enable the debug log or the 'thumbnail' log group to make sure errors + * are logged to a file for review. + */ +$wgIgnoreImageErrors = false; /** Set $wgCommandLineMode if it's not set already, to avoid notices */ Index: trunk/phase3/RELEASE-NOTES =================================================================== --- trunk/phase3/RELEASE-NOTES (revision 14411) +++ trunk/phase3/RELEASE-NOTES (revision 14412) @@ -348,7 +348,11 @@ * Shut up the parser test whining about files in a temp directory. * (bug 6098) Add Aragonese language support (an) * (bug 6101) Update for Russian language (ru) +* Add $wgIgnoreImageErrors to suppress error messages for thumbnail rendering + problems. If errors are transitory, this should reduce annoying messages + making it into cached display. + == Compatibility == MediaWiki 1.7 requires PHP 5 (5.1 recommended). PHP 4 is no longer supported.