(bug 17897) Uninitialized string offset in <pre> tags. Patch by Luigi Corsaro. No...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 11 Mar 2009 13:28:22 +0000 (13:28 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 11 Mar 2009 13:28:22 +0000 (13:28 +0000)
CREDITS
RELEASE-NOTES
includes/parser/Parser.php

diff --git a/CREDITS b/CREDITS
index 1985d91..4aef01a 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -70,6 +70,7 @@ following names for their contribution to the product.
 * Juliano F. Ravasi
 * Lucas Garczewski
 * Louperivois
+* Luigi Corsaro
 * Manuel Menal
 * Marcin Cieślak
 * Marooned
index acdbf20..68f5a96 100644 (file)
@@ -258,6 +258,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 17860) Moving a page in the "MediaWiki" namespace using SuppressRedirect
   no longer corrupts the message cache
 * (bug 17900) Fixed User Groups interface log display after saving groups.
+* (bug 17897) Fixed string offset error in <pre> tags
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index eeb06d4..cec5970 100644 (file)
@@ -2088,7 +2088,7 @@ class Parser
                                                $inBlockElem = true;
                                        }
                                } else if ( !$inBlockElem && !$this->mInPre ) {
-                                       if ( ' ' == $t{0} and ( $this->mLastSection === 'pre' or trim($t) != '' ) ) {
+                                       if ( ' ' == substr( $t, 0, 1 ) and ( $this->mLastSection === 'pre' or trim($t) != '' ) ) {
                                                // pre
                                                if ($this->mLastSection !== 'pre') {
                                                        $paragraphStack = false;