Followup r76782: is_a() -> instanceof (we dropped PHP 4 support over 3 years ago...
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 16 Nov 2010 14:23:34 +0000 (14:23 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 16 Nov 2010 14:23:34 +0000 (14:23 +0000)
includes/specials/SpecialUploadStash.php
includes/upload/UploadBase.php

index d6ed933..5ae6916 100644 (file)
@@ -60,7 +60,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                $code = 500;
                $message = 'Unknown error';
 
-               if ( !isset( $subPage ) or $subPage === '' ) {
+               if ( !isset( $subPage ) || $subPage === '' ) {
                        // the user probably visited the page just to see what would happen, so explain it a bit.
                        $code = '400';
                        $message = "Missing key\n\n" 
index 68ec3e1..5c970d8 100644 (file)
@@ -1213,13 +1213,13 @@ abstract class UploadBase {
                $file = $this->getLocalFile();
                // TODO This cries out for refactoring. We really want to say $file->getAllInfo(); here. 
                // Perhaps "info" methods should be moved into files, and the API should just wrap them in queries.
-               if ( is_a( $file, 'UploadStashFile' ) ) { 
+               if ( $file instanceof UploadStashFile ) {
                        $imParam = ApiQueryStashImageInfo::getPropertyNames();
                        $info = ApiQueryStashImageInfo::getInfo( $file, array_flip( $imParam ), $result );
                } else {
                        $imParam = ApiQueryImageInfo::getPropertyNames();
                        $info = ApiQueryImageInfo::getInfo( $file, array_flip( $imParam ), $result );
-               } 
+               }
                return $info;
        }