From: Ricordisamoa Date: Thu, 11 Feb 2016 14:57:48 +0000 (+0100) Subject: InfoAction: Remove array dereferencing workaround X-Git-Tag: 1.31.0-rc.0~7982 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=3fdff2783c7924938fbb6ef2bfd84d9ffa0e6339;p=lhc%2Fweb%2Fwiklou.git InfoAction: Remove array dereferencing workaround Change-Id: I99d3773a52d4b99367eb3008009da0ffd8a4690a --- diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 6f33db723d..a3bd93aa5d 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -410,9 +410,9 @@ class InfoAction extends FormlessAction { // Is this page affected by the cascading protection of something which includes it? if ( $title->isCascadeProtected() ) { $cascadingFrom = ''; - $sources = $title->getCascadeProtectionSources(); // Array deferencing is in PHP 5.4 :( + $sources = $title->getCascadeProtectionSources()[0]; - foreach ( $sources[0] as $sourceTitle ) { + foreach ( $sources as $sourceTitle ) { $cascadingFrom .= Html::rawElement( 'li', array(), Linker::linkKnown( $sourceTitle ) ); }