This commit is contained in:
thinkphp
2016-06-21 00:03:36 +08:00
parent 948d0ea0bb
commit e48fbac66f

View File

@@ -11,8 +11,6 @@
namespace think; namespace think;
use think\App;
class Config class Config
{ {
// 配置参数 // 配置参数
@@ -42,7 +40,7 @@ class Config
if (empty($type)) { if (empty($type)) {
$type = pathinfo($config, PATHINFO_EXTENSION); $type = pathinfo($config, PATHINFO_EXTENSION);
} }
$class = strpos($type, '\\') ? $type : '\\think\\config\\driver\\' . ucwords($type); $class = false !== strpos($type, '\\') ? $type : '\\think\\config\\driver\\' . ucwords($type);
self::set((new $class())->parse($config), $name, $range); self::set((new $class())->parse($config), $name, $range);
} }