[pmwiki-users] preg_replace issue for php 5.6

Petko Yotov 5ko at 5ko.fr
Sat Jul 25 10:39:04 CDT 2015


On 2015-07-25 14:23, Jean-Pierre Chrétien wrote:
> 5/ When I run the homepage with action=edit, a set of preg_replace 
> errors
> appear again, while no ruleset errors are detected. So I enter the 
> procedure
> of deactivating all modules I use, namely bonny skin, captcha, mini, 
> pmform,
> convert-html and flowplayer

The same warning may appear with some of the $*Patterns arrays, like 
$MakePageNamePatterns or $ROEPatterns if they are not updated for PHP 
5.5. Try deactivating lines from (farm)config.php until you find the one 
that produces the warning.

See how the core $MakePageNamePatterns creates a callback function to 
make a letter uppercase (pmwiki.php, line 729). Or we can help you 
rewrite the patterns.

Also, your shell search may skip some recipes: a regular expression with 
evaluation '/e' may have other modifiers, it may look like

   /iusxe

that is, any letters among [x, s, i, u] before "e" and it is still 
evaluated so will cause a warning. Or the modifiers can be a variable 
like /$mods which is expanded by PHP.

Incidently, the slash is not always present, a regular expression may 
use other delimiters like "!". That's why I mostly rely on progressively 
deactivating recipes or local configuration until I find the problem.

Petko





More information about the pmwiki-users mailing list