More fixes for PHP7.2

This commit is contained in:
Rob Lensen
2018-03-21 23:02:46 +01:00
parent 50d8aafc77
commit 3db22c0d33
4 changed files with 4 additions and 10 deletions
-6
View File
@@ -1399,12 +1399,6 @@ function safe_json_decode($value)
*/
function prepend_append_array_items($array, $prepend_str, $append_str)
{
/* array_walk(
$array,
create_function('&$s', '$s = "'.$prepend_str.'".$s."'.$append_str.'";')
);
*/
//New PHP 7.2 code
array_walk($array, function(&$value, $key) use($prepend_str,$append_str) { $value = "$prepend_str$value$append_str"; } );
return $array;
}