mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PdfHandler
synced 2024-11-23 15:57:17 +00:00
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:
parent
e7cac85f3b
commit
3c55ed3511
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue