[pmwiki-users] Fix blogit for use with PHP 5.5
john.rankin at affinity.co.nz
Mon Nov 3 13:43:30 CST 2014
> On Thu, Oct 30, 2014 at 05:41:42PM -0400, DaveG wrote:
>> On 10/30/2014 1:58 PM, Tiger!P wrote:
>> Quick questions:
>> 1. Tiger!P: With your patch file, why are you making the change to
>> $PageTextVarPatterns, from #blogit_(\w[_-\w]*) to #blogit_(\w[_\w-]*)?
> To get rid of the warning "PHP Warning: preg_match_all(): Compilation
> failed: invalid range in character class at offset 20 in
> /home/tigerp/www/pmwiki-2.2.62/pmwiki.php on line 797"
I think it should read (\w[-_\w]*)
Otherwise, PHP interprets _-\w as "from _ to \w" which is an invalid
range. To exclude - it has to be first in the [ ... ] set.
More information about the pmwiki-users