Date: Sun, 9 Feb 2014 21:39:16 GMT From: Robbert Klarenbeek <robbertkl@renbeek.nl> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/186607: [patch] www/mediawiki121 breaks with PCRE 8.34 Message-ID: <201402092139.s19LdGV7096137@cgiserv.freebsd.org> Resent-Message-ID: <201402092140.s19Le0j6099987@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 186607 >Category: ports >Synopsis: [patch] www/mediawiki121 breaks with PCRE 8.34 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Feb 09 21:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Robbert Klarenbeek >Release: 10.0-RELEASE >Organization: >Environment: FreeBSD ***** 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Last February 5, devel/pcre was updated to 8.34, which causes www/mediawiki to break and show blank pages. See: https://bugzilla.wikimedia.org/show_bug.cgi?id=58640 The issue has already been fixed in mediawiki release 1.22 (which isn't in ports?). AFAIK, the fix isn't yet backported to 1.21, which is the latest mediawiki in ports. Probably the same issue applies to www/mediawiki119 and www/mediawiki/120 as well! >How-To-Repeat: Try to run mediawiki-1.21.5 with pcre-8.34 and all pages will be blank. >Fix: See attached patch, which is a 1.21 backport of the final patch described in https://bugzilla.wikimedia.org/show_bug.cgi?id=58640 Patch attached with submission follows: --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -704,7 +704,9 @@ $magic = MagicWord::get( $name ); $case = intval( $magic->isCaseSensitive() ); foreach ( $magic->getSynonyms() as $i => $syn ) { - $group = "(?P<{$i}_{$name}>" . preg_quote( $syn, '/' ) . ')'; + // Group name must start with a non-digit in PCRE 8.34+ + $it = strtr( $i, '0123456789', 'abcdefghij' ); + $group = "(?P<{$it}_{$name}>" . preg_quote( $syn, '/' ) . ')'; if ( $this->baseRegex[$case] === '' ) { $this->baseRegex[$case] = $group; } else { >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402092139.s19LdGV7096137>