Merge pull request #68 from barryhughes/fix/67-anon-functions

Migrate from create_func to native anon func | #67
This commit is contained in:
Arvid Zimmermann 2020-10-24 21:35:23 +02:00 committed by GitHub
commit 3926ac5899
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,8 +216,10 @@ function system_geterr($module = '') {
/* delayed print */
function system_dpr($action, $content) {
$p = print_r($content, 1);
$f = create_function('', "echo '<pre style=\'position:absolute\'>$p</pre>';");
add_action($action, $f);
add_action($action, function() use ($p) {
echo "<pre style='position:absolute'>$p</pre>";
});
}
?>