Browse Source

修复安装脚本错误

Karson 4 years ago
parent
commit
700184c8eb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      application/admin/command/Install.php

+ 1 - 1
application/admin/command/Install.php

@@ -210,7 +210,7 @@ class Install extends Command
             }
             return "'{$matches[1]}'{$matches[2]}=>{$matches[3]}Env::get('database.{$matches[1]}', '{$replace}'),";
         };
-        $dbConfigText = preg_replace_callback("/'(hostname|database|username|password|hostport|prefix)'(\s+)=>(\s+)Env::get\((.*)\)\,/", $callback, $config);
+        $dbConfigText = preg_replace_callback("/'(hostname|database|username|password|hostport|prefix)'(\s+)=>(\s+)Env::get\((.*)\)\,/", $callback, $dbConfigText);
 
         // 检测能否成功写入数据库配置
         $result = @file_put_contents($dbConfigFile, $dbConfigText);