Fix bug in wfMsgExt under PHP 5.1.2
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 29 Apr 2006 13:55:38 +0000 (13:55 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 29 Apr 2006 13:55:38 +0000 (13:55 +0000)
RELEASE-NOTES
includes/GlobalFunctions.php

index 53ab7ee..0c14517 100644 (file)
@@ -140,6 +140,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * The returnto parameter is now actually used by SpecialUserlogin.php
 * Parser can now know that it is parsing an interface message
 * (bug 4737) MediaWiki:Viewcount supports {{PLURAL}} now
+* Fix bug in wfMsgExt under PHP 5.1.2
 
 == Compatibility ==
 
index 53a7bdb..5502d9c 100644 (file)
@@ -574,7 +574,8 @@ function wfMsgExt( $key, $options ) {
                $string = $wgOut->parse( $string, true, true );
        } elseif ( in_array('parseinline', $options) ) {
                $string = $wgOut->parse( $string, true, true );
-               if( preg_match( "~^<p>(.*)\n?</p>$~", $string, $m = null ) ) {
+               $m = array();
+               if( preg_match( "~^<p>(.*)\n?</p>$~", $string, $m ) ) {
                        $string = $m[1];
                }
        } elseif ( in_array('escape', $options) ) {