From: Brion Vibber Date: Sun, 18 Sep 2005 01:19:33 +0000 (+0000) Subject: * (bug 3489) PHP 5.1 compat problem with captioned images X-Git-Tag: 1.6.0~1620 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=7925783923cb152c31457794df1779fecb5bb7a9;p=lhc%2Fweb%2Fwiklou.git * (bug 3489) PHP 5.1 compat problem with captioned images --- 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;