displaytitle: Pass-by-reference fix for PHP 5.4
authorMatmaRex <matma.rex@gmail.com>
Thu, 20 Jun 2013 22:18:36 +0000 (00:18 +0200)
committerMatmaRex <matma.rex@gmail.com>
Thu, 20 Jun 2013 22:18:36 +0000 (00:18 +0200)
PHP 5.4 includes some pass-by-reference changes which apparently make
the '&' sigil necessary here.

Spotted by Mormegil <mormegil@centrum.cz>. Followup to Ie162535b.

Change-Id: I038fa7f8e1559c95dba7b9b498fc1d1f5eb76887

includes/parser/CoreParserFunctions.php

index 2cdfc6e..8b513a6 100644 (file)
@@ -377,7 +377,7 @@ class CoreParserFunctions {
 
                // disallow some styles that could be used to bypass $wgRestrictDisplayTitle
                if ( $wgRestrictDisplayTitle ) {
-                       $htmlTagsCallback = function ( $params ) {
+                       $htmlTagsCallback = function ( &$params ) {
                                $decoded = Sanitizer::decodeTagAttributes( $params );
 
                                if ( isset( $decoded['style'] ) ) {