From 7925783923cb152c31457794df1779fecb5bb7a9 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 18 Sep 2005 01:19:33 +0000 Subject: [PATCH] * (bug 3489) PHP 5.1 compat problem with captioned images --- RELEASE-NOTES | 1 + includes/Parser.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c5198d29d5..6537359588 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -113,6 +113,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 3485) Fix bogus warning about filename capitalization when off * (bug 2792) Update rebuildrecentchanges.inc for new schema * Special:Import/importDump fixes: report XML parse errors, accept +* (bug 3489) PHP 5.1 compat problem with captioned images === Caveats === diff --git a/includes/Parser.php b/includes/Parser.php index df2743221e..81e932a0c9 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1345,7 +1345,8 @@ class Parser $found = false; while (isset ($a[$k+1]) ) { #look at the next 'line' to see if we can close it there - $next_line = array_shift(array_splice( $a, $k + 1, 1) ); + $spliced = array_splice( $a, $k + 1, 1 ); + $next_line = array_shift( $spliced ); if( preg_match("/^(.*?]].*?)]](.*)$/sD", $next_line, $m) ) { # the first ]] closes the inner link, the second the image $found = true; -- 2.20.1