改进驱动命名空间检测

This commit is contained in:
thinkphp
2016-06-21 00:01:31 +08:00
parent 5c7618f2fa
commit 948d0ea0bb
8 changed files with 59 additions and 60 deletions

View File

@@ -89,7 +89,7 @@ class Session
}
if (!empty($config['type'])) {
// 读取session驱动
$class = strpos($config['type'], '\\') ? $config['type'] : '\\think\\session\\driver\\' . ucwords($config['type']);
$class = false !== strpos($config['type'], '\\') ? $config['type'] : '\\think\\session\\driver\\' . ucwords($config['type']);
// 检查驱动类
if (!class_exists($class) || !session_set_save_handler(new $class($config))) {