[pmwiki-users] Problems with PmWiki & PHP 7.2

Petko Yotov 5ko at 5ko.fr
Sun Apr 28 23:27:24 PDT 2019


Both warnings you describe seem to be documented on this page:

    https://www.pmwiki.org/wiki/PmWiki/Troubleshooting

At donosborn.org/pmwiki/pmwiki.php?action=ruleset it appears that you 
have older versions of some recipes, specifically pagetoc.php and 
pmfeed.php (which have newer versions reportedly working with PHP7), nd 
rssdisplay.php (which may need an update).

The create_function() warning probably comes from multilanguage.php. 
I've uploaded a new version to the cookbook that should work fine with 
PHP 7.2, please get it there.

There may be other recipes that need updates for PHP 7.2, please read at 
the Troubleshooting page how to track those and report them so we'll fix 
them.

Petko

-- 
If you upgrade :  http://www.pmwiki.org/Upgrades


On 29/04/2019 06:18, Donald Z. Osborn wrote:
> 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:
> 
> 1.
> 
> 1a. Error message (quotes added):
> 
> " DEPRECATED: Function create_function() is deprecated in
> /MISC/32/000/115/128/8/USER/WEB/DONOSBORN.ORG/PMWIKI/PMWIKI.PHP [1] 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):
> https://wordpress.org/support/topic/fix-for-create_function-deprecated-in-php-7-2/
>  Might this fix be adapted to line 497 in pmwiki.php?
> 
> 2.
> 
> 2a. Error message (quotes added):
> 
> " WARNING: preg_replace(): The /e modifier is no longer supported, use
> preg_replace_callback instead in
> /MISC/32/000/115/128/8/USER/WEB/DONOSBORN.ORG/PMWIKI/PMWIKI.PHP [1] 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
> 
> 
> 
> Links:
> ------
> [1] http://donosborn.org/pmwiki/pmwiki.php
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users



More information about the pmwiki-users mailing list