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
*/
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;
}