From 34bea1521f7a3f6b92909e2648eaeedaf3e71e2a Mon Sep 17 00:00:00 2001 From: Mateusz Rybarski Date: Wed, 28 Dec 2016 13:55:24 +0100 Subject: [PATCH] XW-2444: notice fix --- controllers/PortableInfoboxParserTagController.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/controllers/PortableInfoboxParserTagController.class.php b/controllers/PortableInfoboxParserTagController.class.php index d40d620..5903870 100644 --- a/controllers/PortableInfoboxParserTagController.class.php +++ b/controllers/PortableInfoboxParserTagController.class.php @@ -210,10 +210,8 @@ class PortableInfoboxParserTagController extends WikiaController { $sourceParam = $colorName . '-source'; $defaultParam = $colorName . '-default'; - $sourceParamValue = trim( $frame->getArgument( $params[ $sourceParam ] ) ); - - if ( isset( $params[ $sourceParam ] ) && !empty( $sourceParamValue ) ) { - $color = $sourceParamValue; + if ( isset( $params[ $sourceParam ] ) && !empty( $frame->getArgument( $params[ $sourceParam ] ) ) ) { + $color = trim( $frame->getArgument( $params[ $sourceParam ] ) ); } else if ( isset( $params[ $defaultParam ] ) ) { $color = trim( $params[ $defaultParam ] ); } else {