升级ThinkPHP到6.0.1

This commit is contained in:
win7 committed 2020-01-02 10:32:04 +08:00
1 parent c429547ff1
commit fc62c7c8a2
33 files changed
+383 -303

No files matched your search

+2 -2
View File
@@ -370,7 +370,7 @@ if (!function_exists('redirect')) {
* @param int $code 状态码
* @return \think\response\Redirect
*/
function redirect(string $url, int $code = 302): Redirect
function redirect(string $url = '', int $code = 302): Redirect
{
return Response::create($url, 'redirect', $code);
}
@@ -523,7 +523,7 @@ if (!function_exists('validate')) {
} else {
if (strpos($validate, '.')) {
// 支持场景
list($validate, $scene) = explode('.', $validate);
[$validate, $scene] = explode('.', $validate);
}
$class = false !== strpos($validate, '\\') ? $validate : app()->parseClass('validate', $validate);
+1 -1
View File
@@ -39,7 +39,7 @@ use think\initializer\RegisterService;
*/
class App extends Container
{
const VERSION = '6.0.0';
const VERSION = '6.0.1';
/**
* 应用调试模式
+3 -3
View File
@@ -304,7 +304,8 @@ class Container implements ContainerInterface, ArrayAccess, IteratorAggregate, C
{
if (is_array($method)) {
[$class, $method] = $method;
$class = is_object($class) ? $class : $this->invokeClass($class);
$class = is_object($class) ? $class : $this->invokeClass($class);
} else {
// 静态方法
[$class, $method] = explode('::', $method);
@@ -314,8 +315,7 @@ class Container implements ContainerInterface, ArrayAccess, IteratorAggregate, C
$reflect = new ReflectionMethod($class, $method);
} catch (ReflectionException $e) {
$class = is_object($class) ? get_class($class) : $class;
$message = sprintf('method not exists: %d::%d()', $class, $method);
throw new FuncNotFoundException($message, "{$class}::{$method}", $e);
throw new FuncNotFoundException('method not exists: ' . $class . '::' . $method . '()', "{$class}::{$method}", $e);
}
$args = $this->bindParams($reflect, $vars);
Loaded 3 of 33 files, more files were not shown because too many files have changed in this diff. Show more