Another patch: create_function() is deprecated since PHP 7.2
-
Unfortunately the patch provided by ricflomag2 does not work as expected. E.g. the variables
$metabox_idand$classare empty when executed in the scope of the anonymous function. A construct likefunction() use ($class) { ... $x = $class; ... }has to be used to induce variables from the parent scope.I’ve uploaded a patched version of file edit-screen.php to Gist. Now the new anonymous functions give the same result as the previous create_function() calls.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Another patch: create_function() is deprecated since PHP 7.2’ is closed to new replies.