提交 736453ff 编写于 作者: 李光春's avatar 李光春

- 修复数组门面增加数组删除空格函数问题

上级 acff9b20
## v6.0.105 / 2020-08-08
- 修复数组门面增加数组删除空格函数问题
## v6.0.104 / 2020-08-05
- 修复数组门面增加数组删除空格函数问题
......
......@@ -26,7 +26,7 @@ use think\db\exception\DbException;
/**
* 定义当前版本
*/
const VERSION = '6.0.104';
const VERSION = '6.0.105';
if (!function_exists('get_ip_info')) {
/**
......
......@@ -134,9 +134,21 @@ class Arrays
if (is_array($value)) {
$arr[$key] = $this->TrimArray($value);
} else {
$arr[$key] = (new Strings)->trimAll(trim($value));
$arr[$key] = $this->trimAll(trim($value));
}
}
return $arr;
}
/**
* 字符串删除空格
* @param $str
* @return string|string[]
*/
private function trimAll($str)
{
$oldchar = array(" ", " ", "\t", "\n", "\r");
$newchar = array("", "", "", "", "");
return str_replace($oldchar, $newchar, $str);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册