Skip to content

Commit

Permalink
Replaced create_function in array_map (action.php) with anonymous fun…
Browse files Browse the repository at this point in the history
…ction for php 8.0 compatibility.
  • Loading branch information
turnermm committed Dec 30, 2020
1 parent 6e59538 commit fee0099
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ function pagefromtemplate(Doku_Event $event, $param) {

if($this->getConf('userreplace')) {
$stringvars =
array_map(create_function('$v', 'return explode(",",$v,2);'),
explode(';',$_REQUEST['newpagevars']));
array_map(function($v) { return explode(",",$v,2);}, explode(';',$_REQUEST['newpagevars']));
foreach($stringvars as $value) {
$tpl = str_replace(trim($value[0]),hsc(trim($value[1])),$tpl);
}
Expand Down

0 comments on commit fee0099

Please sign in to comment.