From 0148602a913212e30dc62180b985a7d8272ea530 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 6 Jul 2006 17:09:10 +0000 Subject: [PATCH] * (bug 6560) Avoid PHP notice when trimming ISBN whitespace --- RELEASE-NOTES | 2 ++ includes/Parser.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c5eb4fdacb..2bacc078f4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -649,6 +649,8 @@ Some default configuration options have changed: * (bug 6570) Update to Indonesian localisation (id) #26 * Added Telugu translation (te) * Update to Catalan translation (ca) +* (bug 6560) Avoid PHP notice when trimming ISBN whitespace + == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index a533464d87..31976baf23 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3405,7 +3405,7 @@ class Parser } $isbn = $blank = '' ; - while ( ' ' == $x{0} ) { + while ( $x !== '' && ' ' == $x{0} ) { $blank .= ' '; $x = substr( $x, 1 ); } -- 2.20.1