01466: "create_function" deprecated

Summary: "create_function" deprecated
Created: 2021-03-23 23:10
Status: Open
Category: PHP Compatibility
Assigned:
Priority: 2
Version: 2.2.138
OS: PHP 7.3.27

Description: https://www.pmwiki.org/wiki/PmWiki/Troubleshooting is stated to upgrade to newest pmwiki version, when having this deprication issue. i just did and ... on line 504 in newest pmwiki.php: "

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

" what shall i do with this line? can i comment it out without breaking something?

Petr Smely? March 23, 2021, at 11:11 PM

No, sorry, you cannot comment out the line without breaking something -- you need to update or disable your obsolete recipes. See the Troubleshooting page on how to track which of your local customizations (addons, skins or recipes) call that line and trigger the warning. If the recipes have a more recent version, get it, otherwise let me know and I'll see if I can help. --Petko March 23, 2021, at 11:33 PM

thank you very much, Petko, for your quick answer. i identified the failing addon. it's my beloved monobook skin, which has no update since 2016. the php-code is not extensive, i think, i could fix it. i found, that Markup_e (@line 149) is doing no good. as i don't use those directives, i could comment them out ... et voila! it's working. case closed. Petr Smely? March 24, 2021, at 21:58 MET

There is already a fix to download for this skin, in the Installation section it says "For PHP versions 5.5 and 7.2 or newer, please get monobook72.php, rename it to monobook.php and replace the one in pub/skins/monobook." --Petko March 25, 2021, at 02:46 AM