[pmwiki-users] preg_replace (RFC)
pbowers at pobox.com
Fri Dec 5 16:03:09 CST 2014
On Fri, Dec 5, 2014 at 10:33 PM, Patrick R. Michaud <pmichaud at pobox.com>
> > page. The pmwiki-debug.php version could do various things to help
> From a maintainer's point of view, this is a real pain, because you have
> to do extra work to keep the two copies in sync. The standard way to do
> this in programming is using a flag variable.
Yes, that's why I suggested a flag in the next paragraph. :-)
> > creating an array indexed by regex/replace strings and holding a
> > "Scriptname.php: lineno" string. Then when Petko's error is triggered it
> > could include the script name and line #
> I still think it's better to report things when the markup rule
> is registered (i.e., inside the call to Markup()), rather than when
> the rule is executed. And the existence of debug_backtrace ought to
> mean that PmWiki doesn't need to do any special tracing of its own.
I agree ... for this particular problem. However, if there is some unknown
markup rule causing an error in some other situation that we don't know
about yet this would provide a general purpose solution rather than a
specific-to-this-problem solution. But I'm quite content leaving this out
of core - I was just trying to generate some ideas for the RFC...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pmwiki-users