[pmwiki-users] Another recipe that maybe needs to be fixed
Petko Yotov
5ko at 5ko.fr
Wed Aug 14 07:11:05 PDT 2019
On 14/08/2019 15:56, Johan Bengtsson wrote:
> https://www.pmwiki.org/wiki/Cookbook/Mailform4
>
> The recipe claims to be PHP 5.5 compliant but Markup_e shouldn't be
> used??
Markup_e() was indeed added because of a change in PHP 5.5, so the
recipe works with PHP 5.5.
Unfortunately create_function() used by Markup_e() was recently
deprecated in PHP 7.2.
> From mailform4.php:
>
> if(function_exists('Markup_e')) {
> Markup_e('mailform4-show-msgs', 'directives',
> "/\\(:mailform4-show-msgs:\\)/", "Mailform4ShowMsgs()");
> }
> else {
> Markup('mailform4-show-msgs', 'directives',
> "/\\(:mailform4-show-msgs:\\)/e", "Mailform4ShowMsgs()");
> }
For PHP 7.2 the above block should be replaced with this one line:
Markup('mailform4-show-msgs', 'directives',
"/\\(:mailform4-show-msgs:\\)/", "Mailform4ShowMsgs");
This will also work in PHP 5.5 or earlier, only with PmWiki 2.2.56 or
newer.
Petko
--
If you upgrade : http://www.pmwiki.org/Upgrades
More information about the pmwiki-users
mailing list