InfoAction: Remove array dereferencing workaround
authorRicordisamoa <ricordisamoa@openmailbox.org>
Thu, 11 Feb 2016 14:57:48 +0000 (15:57 +0100)
committerKrinkle <krinklemail@gmail.com>
Thu, 11 Feb 2016 15:08:30 +0000 (15:08 +0000)
Change-Id: I99d3773a52d4b99367eb3008009da0ffd8a4690a

includes/actions/InfoAction.php

index 6f33db7..a3bd93a 100644 (file)
@@ -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 ) );
                        }