From d3144ee23490189f8634d9478933e98f067a9e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Fri, 20 Sep 2024 09:31:34 +0200 Subject: [PATCH] fix: cannot install without prefix (#4001) --- framework/core/src/Database/Migrator.php | 2 +- framework/core/src/Install/DatabaseConfig.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/core/src/Database/Migrator.php b/framework/core/src/Database/Migrator.php index c5830b7ed2..11e7c50e46 100644 --- a/framework/core/src/Database/Migrator.php +++ b/framework/core/src/Database/Migrator.php @@ -252,7 +252,7 @@ public function installFromSchema(string $path, string $driver): bool $statement = str_replace( 'db_prefix_', - $this->connection->getTablePrefix(), + $this->connection->getTablePrefix() ?? '', $statement ); $this->connection->statement($statement); diff --git a/framework/core/src/Install/DatabaseConfig.php b/framework/core/src/Install/DatabaseConfig.php index ee81eccfbd..f093f76f2c 100644 --- a/framework/core/src/Install/DatabaseConfig.php +++ b/framework/core/src/Install/DatabaseConfig.php @@ -21,7 +21,7 @@ public function __construct( private string $database, private readonly ?string $username, private readonly ?string $password, - private readonly string $prefix + private readonly ?string $prefix ) { $this->validate(); }