Follow-up r81558: Only raise a warning if no image handler could be found
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 11 Feb 2011 15:31:52 +0000 (15:31 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 11 Feb 2011 15:31:52 +0000 (15:31 +0000)
includes/api/ApiQueryImageInfo.php

index e612a60..f742db4 100644 (file)
@@ -248,8 +248,9 @@ class ApiQueryImageInfo extends ApiQueryBase {
 
                $h = $image->getHandler();
                if ( !$h ) {
-                       // No handler, so no value for iiurlparam is valid.
-                       $this->dieUsage( "Invalid value for {$p}urlparam", "urlparam" );
+                       $this->setWarning( 'Could not create thumbnail because ' . 
+                               $image->getName() . ' does not have an associated image handler' );
+                       return;
                }
                foreach ( $thumbParams as $name => $value ) {
                        if ( !$h->validateParam( $name, $value ) ) {