改进异常语言包的加载

This commit is contained in:
thinkphp
2016-06-16 17:01:19 +08:00
parent 744fa08329
commit ef05d5f44b
2 changed files with 5 additions and 3 deletions

View File

@@ -926,8 +926,7 @@ class Route
if ($option['after_behavior'] instanceof \Closure) {
$result = call_user_func_array($option['after_behavior'], [$route]);
} else {
$behaviors = (array)$option['after_behavior'];
foreach($behaviors as $behavior){
foreach((array)$option['after_behavior'] as $behavior){
$result = Hook::exec($behavior, '', $route);
if (!is_null($result)) {
break;