[pmwiki-users] preg_replace (RFC)

DaveG pmwiki at solidgone.com
Fri Dec 5 09:15:01 CST 2014



On 12/4/2014 3:55 AM, Hans Bracker wrote:
>>> I vote for option 3.
>>> It is easy to understand and troubleshoot the problem.
>
> I  think  you are right. It should not be expected for a site admin to
> fix  the  problems introduced by the update to PHP 5.5, which was most
> likely not done by her/him anyway. To be able to identify which recipe
> scripts or skins are generating these error messages would be nice.
> Partly PHP does this and points to the script and code line involved.
> An  admin  should  hopefully  be  able  to  see by this what recipe is
> involved, and check if there is an updated PHP 5.5 compatible version
> available.  Otherwise contact the recipe author or mention the problem
> here on  the user list, where someone else may be able to help to fix
> the  recipe.  I  have  been  relying on such error feedback from users
> about scripts I authored or co-authored.
>
> But  there  are  many PHP error messages pointing to pmwiki.php, which
> are  not  caused  by  pmwiki code directly, but by use of the Markup()
> function  in  recipes  and  skins using the /e modifier in the regular
> expression. I think Petko did a good job adding a PmWiki error message
> in  such cases, which identifies the offending regular expression. But
> how  can  a  site  admin  work out in which recipe or skin script this
> regular  expression  pattern  is?  Because  that is not clear from the
> error message. A Markup() call with /e modifier could be anywhere, and
> an  admin would not know, unless s/he has a good idea about the scripts
> involved  and the regular expressions. One could make a text search on
> all  cookbook  and  skin  scripts for the offending regular expression
> pattern,  I  guess.  So  this is not an easy way to identify offending
> code  and scripts. Still Petko provided a handle and I am grateful for
> that!
>
> Could  PmWiki  be more specific to identify in which function call and
> script offending regular expressions reside? I don't see how.
Agree with this sentiment, and option 3. If we could somehow guide 
admins in tracking down exactly where errors are occurring, beyond the 
pmwiki.php end point I think that would help a great deal. Perhaps an 
option to provide more of a stack trace -- although like Hans, not sure 
how that could be done.


  ~ ~ David



More information about the pmwiki-users mailing list