* (13624) Fix regression with manual thumb= parameter on images
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 7 Apr 2008 23:30:45 +0000 (23:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 7 Apr 2008 23:30:45 +0000 (23:30 +0000)
Fixes parser test case:
* Fuzz testing: image with bogus manual thumbnail  [Fixed between 07-Apr-2008 22:04:11, 1.13alpha (r32931) and 07-Apr-2008 23:29:32, 1.13alpha (r32931)]

RELEASE-NOTES
includes/Parser.php

index 7a9a306..42b9d9e 100644 (file)
@@ -66,6 +66,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Make rev_deleted log entries more intelligible.
 * Logs are grouped under date headings similar to enhanced changes list
 * (6943) Added PAGESINCATEGORY: magic word
+* (13624) Fix regression with manual thumb= parameter on images
 
 
 === Bug fixes in 1.13 ===
index d19f9db..536b88c 100644 (file)
@@ -4465,7 +4465,16 @@ class Parser
                                                $validated = $handler->validateParam( $paramName, $value );
                                        } else {
                                                # Validate internal parameters
-                                               $validated = ( $value === false || is_numeric( trim( $value ) ) );
+                                               switch( $paramName ) {
+                                               case "manualthumb":
+                                                       /// @fixme - possibly check validity here?
+                                                       /// downstream behavior seems odd with missing manual thumbs.
+                                                       $validated = true;
+                                                       break;
+                                               default:
+                                                       // Most other things appear to be empty or numeric...
+                                                       $validated = ( $value === false || is_numeric( trim( $value ) ) );
+                                               }
                                        }
 
                                        if ( $validated ) {