改进cookie助手函数

This commit is contained in:
thinkphp
2017-01-17 11:42:12 +08:00
parent a3fd00eb35
commit fea1b59582

View File

@@ -330,7 +330,7 @@ if (!function_exists('cookie')) {
Cookie::clear($value);
} elseif ('' === $value) {
// 获取
return 0 === strpos($name, '?') ? Cookie::has(substr($name, 1), $option) : Cookie::get($name);
return 0 === strpos($name, '?') ? Cookie::has(substr($name, 1), $option) : Cookie::get($name, $option);
} elseif (is_null($value)) {
// 删除
return Cookie::delete($name);