mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #28217
[Bug 1484296] Re: Typo in XML filter regex
It turns out the site that experienced the error was running PHP 5.5.12,
while my machine is running PHP 5.5.9.
In 5.5.10 they updated the PCRE version from 8.31 to 8.34 (
http://php.net/ChangeLog-5.php#5.5.10 ). And in the release notes for
PCRE 8.34 ( http://www.pcre.org/original/changelog.txt ), there's this:
"23. Perl now gives an error for missing closing braces after \x{...
instead of treating the string as literal. PCRE now does the same."
So that's the reason why the code did not cause any problems on my
machine, but did cause problems on the other site.
It also probably means that the regex was not fully functional even if
it wasn't giving out any errors. Probably the reason it worked for me
was that my test data was using illegal characters in the ASCII range,
which are at the start of the regex, before the part with the syntax
error.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1484296
Title:
Typo in XML filter regex
Status in Mahara:
In Progress
Status in Mahara 15.04 series:
In Progress
Bug description:
A client reported this issue to me while testing the patch
https://reviews.mahara.org/5062
They found that after that patch was in place ALL leap import/export
operations produced this error:
"[WAR] export/leap/lib.php:161 preg_replace(): Compilation failed:
non-hex character in \x{} (closing brace missing?) at offset 92"
On inspection in the code, it's obvious that there is indeed a syntax
error in the regex that I wrote in patch
https://reviews.mahara.org/5061. Specifically a missing closing brace.
It says "\x{FDEO" where it should be "\x{FDEO}". Strangely the
presence of this syntax error did not cause any problems when running
this code on my local machine. I suspect it may be a difference in the
version of the PCRE library that we're running.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1484296/+subscriptions
References