Skip to content

Commit

Permalink
handling of PHP > 7.0.0. compatibility issues (#371)
Browse files Browse the repository at this point in the history
* handling of PHP > 7.0.0. compatibility issues

replace create_function() function as it is deprecated in newer PHP versions.
  • Loading branch information
WebDesignWorx authored and Christoph Bleiweis committed Nov 24, 2018
1 parent cf3e537 commit ac98fab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wbce/framework/frontend.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function search_highlight($foo = '', $arr_string = array())
require WB_PATH . '/search/search_convert.php';
}
$foo = entities_to_umlauts($foo, 'UTF-8');
array_walk($arr_string, create_function('&$v,$k', '$v = preg_quote($v, \'~\');'));
array_walk($arr_string, function(&$v, $k){ $v = preg_quote($v, '\'~\''); });
$search_string = implode("|", $arr_string);
$string = str_replace($string_ul_umlaut, $string_ul_regex, $search_string);
// the highlighting
Expand Down
4 changes: 2 additions & 2 deletions wbce/modules/droplets/tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
'stat' => $stat,
'count' => count($count),
'name' => $file,
'list' => implode( ", ", array_map( create_function('$cnt', 'return $cnt["filename"];'), $count ) ),
'list' => implode( ", ", array_map( function($cnt) { return $cnt["filename"]; }, $count )),
);
}
}
Expand All @@ -211,4 +211,4 @@
}

// print result
wbce_twig_display($twig_data);
wbce_twig_display($twig_data);

0 comments on commit ac98fab

Please sign in to comment.