改进Response类的send方法 改进Input类的自动转换

This commit is contained in:
thinkphp
2016-05-22 15:38:45 +08:00
parent 37525f0a4d
commit 2106cdceaf
2 changed files with 11 additions and 2 deletions

View File

@@ -465,7 +465,11 @@ class Input
// 字符串
case 's':
default:
$data = (string) $data;
if (is_scalar($data)) {
$data = (string) $data;
} else {
throw new Exception('变量类型不允许:' . gettype($data));
}
}
}
}