Migrate from create_func to native anon func | #67

This commit is contained in:
barryhughes 2020-09-11 11:34:39 -07:00
parent c1e368b222
commit 27214a5997

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>";
});
}
?>