]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/NewPassword.php
Merge pull request #5394 from MrPetovan/bug/fix-config-set-return-value
[friendica.git] / src / Core / Console / NewPassword.php
index 51d345dcf1698241be0548ccf9cdef3e5561b17d..003597472716c990e1fab7560623ddbf39060e74 100644 (file)
@@ -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);