Browse Source

修复 dimplode 函数中 array_map 的类型错误 (#306)

pull/84/merge
小胡 3 months ago
committed by GitHub
parent
commit
9ccff0d170
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 11
      core/function/function_core.php

11
core/function/function_core.php

@ -1038,14 +1038,13 @@ function save_syscache($cachename, $data)
}
function dimplode($array)
{
function dimplode($array) {
if (!empty($array)) {
if (!is_array($array)) {
$array = array($array);
}
$array = array_map('addslashes', $array);
return "'" . implode("','", is_array($array) ? $array : array($array)) . "'";
return "'" . implode("','", $array) . "'";
} else {
return 0;
}

Loading…
Cancel
Save