diff options
author | 2022-09-22 09:10:01 -0400 | |
---|---|---|
committer | 2022-09-22 09:10:01 -0400 | |
commit | f061d96a6bcdb9bc8c4ad66ee9f229e0b00f5cec (patch) | |
tree | 2976258c4b36b1d014736d41cdbac02d42c3ff76 | |
parent | Merge branch 'wikitest' (diff) | |
download | skin-tyrian-f061d96a6bcdb9bc8c4ad66ee9f229e0b00f5cec.tar.gz skin-tyrian-f061d96a6bcdb9bc8c4ad66ee9f229e0b00f5cec.tar.bz2 skin-tyrian-f061d96a6bcdb9bc8c4ad66ee9f229e0b00f5cec.zip |
Remove warnings and deprecation in footer
Bug: https://bugs.gentoo.org/872281
Signed-off-by: Brian Evans <grknight@gentoo.org>
-rw-r--r-- | TyrianTemplate.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/TyrianTemplate.php b/TyrianTemplate.php index a11fd4c..c515853 100644 --- a/TyrianTemplate.php +++ b/TyrianTemplate.php @@ -146,7 +146,21 @@ class TyrianTemplate extends BaseTemplate { } private function footer() { - $validFooterIcons = $this->getFooterIcons( "icononly" ); + $footericons = $this->get( 'footericons' ); + + // Unset any icons which don't have an image + foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) { + foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) { + if ( !is_string( $footerIcon ) && !isset( $footerIcon['src'] ) ) { + unset( $footerIconsBlock[$footerIconKey] ); + } + } + if ( $footerIconsBlock === [] ) { + unset( $footericons[$footerIconsKey] ); + } + } + + $validFooterIcons = $footericons; $validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links $currentYear = date('Y'); ?> @@ -189,7 +203,6 @@ class TyrianTemplate extends BaseTemplate { </div> </footer> <?php - echo $footerEnd; } /** |