From 3ea7bec6db2bd88b72f1bbbbb9494c49eaf69fdd Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Sat, 1 Aug 2020 21:05:57 +0300 Subject: [PATCH] Don't add Vector-specific classes when not using Vector Hooks are global, unlike the old Skin addToBodyAttributes() method, which was per-skin. Follow-up to a04fc71f30645b54840fa059f746c9504d969649 Change-Id: Ic8a581256c4775ba45b2c5188d678751ba9c7023 --- includes/Hooks.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/Hooks.php b/includes/Hooks.php index f1c282dd9..d4b2cad92 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -210,6 +210,10 @@ class Hooks { * @param string[] &$bodyAttrs */ public static function onOutputPageBodyAttributes( OutputPage $out, Skin $sk, &$bodyAttrs ) { + if ( !$sk instanceof SkinVector ) { + return; + } + $skinVersionLookup = new SkinVersionLookup( $out->getRequest(), $sk->getUser(), self::getServiceConfig() );