aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2022-09-22 09:10:01 -0400
committerBrian Evans <grknight@gentoo.org>2022-09-22 09:10:01 -0400
commitf061d96a6bcdb9bc8c4ad66ee9f229e0b00f5cec (patch)
tree2976258c4b36b1d014736d41cdbac02d42c3ff76
parentMerge branch 'wikitest' (diff)
downloadskin-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.php17
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;
}
/**