* Add $wgIgnoreImageErrors to suppress error messages for thumbnail rendering problem...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 26 May 2006 21:33:38 +0000 (21:33 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 26 May 2006 21:33:38 +0000 (21:33 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/Image.php

index 45cfc31..d83d45e 100644 (file)
@@ -348,6 +348,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * 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 ==
 
index a96a1d0..4a8cda7 100644 (file)
@@ -1326,6 +1326,18 @@ $wgMaxImageArea = 1.25e7;
  */
 $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 1ba084e..cf92d97 100644 (file)
@@ -1011,6 +1011,10 @@ class Image
                                $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