From: Alexandre Emsenhuber Date: Sun, 6 Apr 2014 16:28:17 +0000 (+0200) Subject: Remove isset() check in Sanitizer::setupAttributeWhitelist() X-Git-Tag: 1.31.0-rc.0~15400^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=c156ad2c4e93b9deb56b3bd9af7ac605c9b2c6f8;p=lhc%2Fweb%2Fwiklou.git Remove isset() check in Sanitizer::setupAttributeWhitelist() Declared variables have a default value of null, so there is no point to use isset() to check only if it has the value null. Also changed the location of the line break to group variable declarations. Change-Id: Ic36fc95db86909d8b5075954a72afa479fa20d0d --- diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 1ea6523203..6a568c2d0c 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -1507,11 +1507,11 @@ class Sanitizer { */ static function setupAttributeWhitelist() { global $wgAllowRdfaAttributes, $wgAllowMicrodataAttributes; - static $whitelist, $staticInitialised; + $globalContext = implode( '-', compact( 'wgAllowRdfaAttributes', 'wgAllowMicrodataAttributes' ) ); - if ( isset( $whitelist ) && $staticInitialised == $globalContext ) { + if ( $whitelist !== null && $staticInitialised == $globalContext ) { return $whitelist; }