App::getEnv default value

This commit is contained in:
fogelito
2023-08-13 13:39:06 +03:00
parent 2aa3b1e296
commit 1488bf1d20
+1 -1
View File
@@ -253,7 +253,7 @@ class Backup extends Action
public function getDsn(string $database): ?DSN
{
foreach (explode(',', App::getEnv('_APP_CONNECTIONS_DB_REPLICAS')) as $project) {
foreach (explode(',', App::getEnv('_APP_CONNECTIONS_DB_REPLICAS', '')) as $project) {
[$db, $dsn] = explode('=', $project);
if ($db === $database) {
return new DSN($dsn);