From c156ad2c4e93b9deb56b3bd9af7ac605c9b2c6f8 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 6 Apr 2014 18:28:17 +0200 Subject: [PATCH] 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 --- includes/Sanitizer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.20.1