Spage has uploaded a new change for review. https://gerrit.wikimedia.org/r/240632
Change subject: Ensure class within personal_urls is a string ...................................................................... Ensure class within personal_urls is a string The personal_urls array items for Echo notifications can have an array for 'class', which causes PHP warnings from Skin.template's simplistic class="{{class}}" So stringify this on the server. Bug: T113566 Change-Id: I4b0178b7f01282e1a766ffce9159f0c68f1d190a --- M src/BlueprintSkinTemplate.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/32/240632/1 diff --git a/src/BlueprintSkinTemplate.php b/src/BlueprintSkinTemplate.php index 76078b3..133fe51 100644 --- a/src/BlueprintSkinTemplate.php +++ b/src/BlueprintSkinTemplate.php @@ -5,6 +5,14 @@ global $wgBlueprintLeftNav; $this->data['left_nav_sections'] = $this->getLeftNav(); + + // personal_urls[].class can be an array (e.g. it is for Echo notifications), + // if so stringify it (T113566). + foreach( $this->data['personal_urls'] as $k => &$v ) { + if ( array_key_exists( 'class', $v ) && is_array( $v['class'] ) ) { + $v['class'] = implode( ' ', $v['class'] ); + } + } return parent::execute(); } -- To view, visit https://gerrit.wikimedia.org/r/240632 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b0178b7f01282e1a766ffce9159f0c68f1d190a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Spage <sp...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits