Fix #6720 Regression re isDatabaseInstalled (#6729)

This commit is contained in:
Martin Rüegg 2023-12-13 16:06:09 +01:00 committed by GitHub
parent 94e594b9be
commit 7e4d844ab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -102,9 +102,9 @@ trait ApplicationTrait
*/
public function isDatabaseInstalled(bool $checkConnection = false): bool
{
$dieOnError = isset(Yii::$app->params['databaseInstalled']) && $this->params['databaseInstalled'];
$dieOnError = $this->params['databaseInstalled'] ?? null;
if (!$checkConnection) {
if (!$checkConnection && $dieOnError !== null) {
return $dieOnError;
}

View File

@ -173,7 +173,6 @@ $config = [
],
'params' => [
'installed' => false,
'databaseInstalled' => false,
'databaseDefaultStorageEngine' => 'InnoDB',
'dynamicConfigFile' => '@config/dynamic.php',
'moduleAutoloadPaths' => ['@app/modules', '@humhub/modules'],

View File

@ -6,12 +6,12 @@
* @license https://www.humhub.com/licences
*/
namespace humhub\tests\codeception\unit\components;
namespace humhub\tests\codeception\unit;
use tests\codeception\_support\HumHubDbTestCase;
use Yii;
class BaseSettingsManagerTest extends HumHubDbTestCase
class ApplicationBaseTest extends HumHubDbTestCase
{
public function testIsDatabaseInstalled()
{