Replace isset() with null check

isset() should only be used to suppress errors, not for null check.
When the variable is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset

Change-Id: I8fc8fbf220a08c300ae0119e548a691865151ae5
This commit is contained in:
Umherirrender 2024-10-26 22:53:52 +02:00
parent e7cac85f3b
commit 3c55ed3511

View file

@ -296,7 +296,7 @@ class PdfHandler extends ImageHandler {
global $wgPdfOutputExtension;
static $mime;
if ( !isset( $mime ) ) {
if ( $mime === null ) {
$magic = MediaWikiServices::getInstance()->getMimeAnalyzer();
$mime = $magic->guessTypesForExtension( $wgPdfOutputExtension );
}