X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FNewPassword.php;h=003597472716c990e1fab7560623ddbf39060e74;hb=2fa6cc000013089d59d9cc221b544ed1a7a4cd37;hp=51d345dcf1698241be0548ccf9cdef3e5561b17d;hpb=334d3921549a538130220f8b627f39f3e0877e26;p=friendica.git diff --git a/src/Core/Console/NewPassword.php b/src/Core/Console/NewPassword.php index 51d345dcf1..0035974727 100644 --- a/src/Core/Console/NewPassword.php +++ b/src/Core/Console/NewPassword.php @@ -58,12 +58,8 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - require_once 'config/.htconfig.php'; - $result = \dba::connect($db_host, $db_user, $db_pass, $db_data); - unset($db_host, $db_user, $db_pass, $db_data); - - if (!$result) { - throw new \RuntimeException('Unable to connect to database'); + if ($a->isInstallMode()) { + throw new \RuntimeException('Database isn\'t ready or populated yet'); } $nick = $this->getArgument(0);