路由检测参数behavior改为 before_behavior

This commit is contained in:
thinkphp
2016-01-27 11:53:10 +08:00
parent 63c3031e04
commit 4c5dd3f151

View File

@@ -460,7 +460,7 @@ class Route
|| (isset($option['ext']) && false === stripos($option['ext'], __EXT__)) // 伪静态后缀检测
|| (isset($option['domain']) && !in_array($option['domain'], [$_SERVER['HTTP_HOST'], self::$subDomain])) // 域名检测
|| (!empty($option['https']) && !self::isSsl()) // https检测
|| (!empty($option['behavior']) && false === Hook::exec($option['behavior'])) // 行为检测
|| (!empty($option['before_behavior']) && false === Hook::exec($option['before_behavior'])) // 行为检测
|| (!empty($option['callback']) && is_callable($option['callback']) && false === call_user_func($option['callback'])) // 自定义检测
) {
return false;