I'm trying to use the PmForm and Captcha Cookbook addons, which use the Template addon. This fails because the Template code uses the deprecated /e extension to preg_replace:

templates.php:45
Markup(
        'parameters',
        '>include',  ## or where?
        "/($Parameters_mg|$Parameters_ms|$Parameters_mu)/e",    <====
        "ParametersParse('\$1')"
);

Markup(
        'template',
        '<include',
        "/\(:template(.*?):\)/e",   <====
        "Template('\$1')"
);

which eventually calls preg_replace(), not preg_replace_callback()
pmwiki.php:1845
        if (is_callable($r)) $x = preg_replace_callback($p,$r,$x);
        else $x=preg_replace($p,$r,$x);   <====

I'm a bit confused by the code, but it looks to me that $r should be callable (which I suppose is the the callback function passed to Markup()), but preg_replace_callback() is not being called.

Is there a fix for this?

--
Michael Eager    [email protected]
1960 Park Blvd., Palo Alto, CA 94306

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to