diff options
Diffstat (limited to 'includes/api')
-rw-r--r-- | includes/api/ApiBase.php | 2 | ||||
-rw-r--r-- | includes/api/ApiMain.php | 2 | ||||
-rw-r--r-- | includes/api/ApiUpload.php | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index c68dbba708b3..6ef7f8741bbe 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -732,7 +732,7 @@ abstract class ApiBase extends ContextSource { * @return IReadableDatabase */ protected function getDB() { - if ( !isset( $this->mReplicaDB ) ) { + if ( !$this->mReplicaDB ) { $this->mReplicaDB = MediaWikiServices::getInstance() ->getConnectionProvider() ->getReplicaDatabase( false, 'api' ); diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index d2c3ea5df6f2..8956e86ee018 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -1336,7 +1336,7 @@ class ApiMain extends ApiBase { * Create the printer for error output */ private function createErrorPrinter() { - if ( !isset( $this->mPrinter ) ) { + if ( !$this->mPrinter ) { $value = $this->getRequest()->getVal( 'format', self::API_DEFAULT_FORMAT ); if ( !$this->mModuleMgr->isDefined( $value, 'format' ) ) { $value = self::API_DEFAULT_FORMAT; diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index 0a79fd855dd5..4576d5afbaaa 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -68,7 +68,7 @@ class ApiUpload extends ApiBase { use ApiWatchlistTrait; - /** @var UploadBase|UploadFromChunks */ + /** @var UploadBase|UploadFromChunks|null */ protected $mUpload = null; /** @var array */ @@ -124,7 +124,7 @@ class ApiUpload extends ApiBase { try { if ( !$this->selectUploadModule() ) { return; // not a true upload, but a status request or similar - } elseif ( !isset( $this->mUpload ) ) { + } elseif ( !$this->mUpload ) { $this->dieDebug( __METHOD__, 'No upload module set' ); } } catch ( UploadStashException $e ) { // XXX: don't spam exception log |