From 56d4c642002e1c02fa5789a3927dbf46c0e6f7de Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 11 Mar 2009 13:28:22 +0000 Subject: [PATCH] (bug 17897) Uninitialized string offset in
 tags. Patch
 by Luigi Corsaro. No parser test regressions.

---
 CREDITS                    | 1 +
 RELEASE-NOTES              | 1 +
 includes/parser/Parser.php | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/CREDITS b/CREDITS
index 1985d91ce9..4aef01af87 100644
--- 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
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index acdbf206e0..68f5a96d03 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -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 
 tags
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index eeb06d4ff1..cec5970ca5 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -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;
-- 
2.20.1