ports/186607: [patch] www/mediawiki121 breaks with PCRE 8.34

Robbert Klarenbeek robbertkl at renbeek.nl
Sun Feb 9 21:40:00 UTC 2014


>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 at 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:


More information about the freebsd-ports-bugs mailing list