[pmwiki-users] Problems with PmWiki & PHP 7.2

Donald Z. Osborn dzosborn at gmail.com
Sun Apr 28 21:18:11 PDT 2019

I'm seeing two errors in pmwiki.php (on the webpage display) that are
apparently related to PHP 7.2. I recently upgraded to the latter on my
server (on which I also run WordPress).

These are:


1a. Error message (quotes added):

" *Deprecated*: Function create_function() is deprecated in
<http://donosborn.org/pmwiki/pmwiki.php>* on line *497*"

1b. Line 497:

 $fn = create_function($args, $code);

1c. Possible fixes:

Not finding anything on PmWiki.org.

WordPress.org support has a fix for this (I found this page by chance in a
web search; my WP installation has no issues):
Might this fix be adapted to line 497 in pmwiki.php?


2a. Error message (quotes added):

" *Warning*: preg_replace(): The /e modifier is no longer supported, use
preg_replace_callback instead in
<http://donosborn.org/pmwiki/pmwiki.php>* on line *1790* "

2b. Lines 1789-1790:

        if (is_callable($r)) $x = preg_replace_callback($p,$r,$x);
        else $x=preg_replace($p,$r,$x);

2c. Possible fixes:

To a layman, it looks like the two lines in pmwiki.php are designed to
respond to different versions of PHP. Should I just clip off line 1790 or
do something else?

Thank you in advance for any help or ideas on this.

Don Osborn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20190429/c1aa9995/attachment.html>

More information about the pmwiki-users mailing list