jenkins-bot has submitted this change and it was merged. Change subject: Fix normalCats warnings ......................................................................
Fix normalCats warnings Make sure it is defined as an empty array before trying to iterate over it. Bug: T148209 Change-Id: Ifd2ae38ee423e36079668fff928ef5bfe624e03d --- M BlueSkyTemplate.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Isarra: Looks good to me, approved jenkins-bot: Verified diff --git a/BlueSkyTemplate.php b/BlueSkyTemplate.php index 1277968..db1f446 100644 --- a/BlueSkyTemplate.php +++ b/BlueSkyTemplate.php @@ -1276,6 +1276,7 @@ ] ] ] ); + $normalCats = []; foreach ( $res as $row ) { if ( strlen( $row->cat_title ) < 25 ) { $normalCats[] = $row->cat_title; @@ -1283,9 +1284,9 @@ } $catList = ''; - if ( count( $normalCats > 0 ) ) { + if ( count( $normalCats ) > 0 ) { $catList = '<ul id="catlist-top">'; - foreach ( $normalCats as $category) { + foreach ( $normalCats as $category ) { $titleSafe = Title::makeTitleSafe( NS_CATEGORY, $category ); if ( !$titleSafe ) { continue; -- To view, visit https://gerrit.wikimedia.org/r/315978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd2ae38ee423e36079668fff928ef5bfe624e03d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/BlueSky Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Isarra <zhoris...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits