From 1787e57448c0621e32da155f895bba5c449682b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Sun, 22 Oct 2023 16:18:47 +0200 Subject: [PATCH] Fix database override --- app/controllers/api/projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index ebeceee135..50b884530a 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -123,7 +123,7 @@ App::post('/v1/projects') $databaseOverride = App::getEnv('_APP_DATABASE_OVERRIDE', null); $index = array_search($databaseOverride, $databases); - if ($index) { + if ($index !== false) { $database = $databases[$index]; } else { $database = $databases[array_rand($databases)];