Update app/init/resources.php

Co-authored-by: Matej Bačo <matejbacocom@gmail.com>
This commit is contained in:
Eldad A. FuxandMatej Bačo authored and GitHub committed 2026-02-20 11:24:42 +01:00
1 parent f9ed35ed8a
commit 8e4fddddbc
1 file changed
+6 -2
+6 -2
View File
@@ -565,8 +565,12 @@ Http::setResource('dbForProject', function (Group $pools, Database $dbForPlatfor
return $dbForPlatform;
}
$database = $project->getAttribute('database');
if ($database === null || $database === '') {
if ($project->isEmpty()) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Project is not configured');
}
$database = $project->getAttribute('database', '');
if (empty($database)) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Project database is not configured');
}