From c31d81ceffc9fa50096a30905426e1a425643b7e Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 16 Nov 2010 14:23:34 +0000 Subject: [PATCH] Followup r76782: is_a() -> instanceof (we dropped PHP 4 support over 3 years ago), or -> || --- includes/specials/SpecialUploadStash.php | 2 +- includes/upload/UploadBase.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index d6ed933e55..5ae691683d 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -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" diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 68ec3e15cc..5c970d8037 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -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; } -- 2.20.1