Last modified: 2014-09-23 23:07:57 UTC
Observed the following error message on the WMF cluster: Apr 9 09:38:58 10.0.2.231 apache2[22312]: PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: missing ) at offset 52 in /usr/local/apache/common-local/wmf-deployment/includes/search/SearchEngine.php on line 1212 Apr 9 09:39:06 10.0.2.231 apache2[22312]:last message repeated 102 times Some quick testing indicates this is very likely to be caused by a literal '(' in the $terms parameter, which is thrown into a regex unescaped. The attached patch fixes this by escaping regex chars in $terms ; I submitted it here rather than committing it straight to SVN because I wasn't sure about the semantics of this function and whether regex chars in $terms being interpreted was a feature or a bug.
Created attachment 7279 [details] Proposed patch
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
+need-review to signal to developers that this patch needs reviewing.
Looks like it's not needed anymore: on input of "foo." $terms is \bfoo\.\b - do you see it in server logs in case it's Lucene-specific?
Roan: Any idea if your patch is still needed? (See comment 5)
I can't find any place where those \b's would have been added.