Skip to content

Commit

Permalink
pkp#10249 Check if application is installed before using the database
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Aug 5, 2024
1 parent 1e31898 commit 43c094b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/core/PKPApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ public function initializeLaravelContainer(): void
*/
protected function setTransactionIsolation(): void
{
if (!Application::isInstalled()) {
return;
}

DB::statement(match (DB::connection()::class) {
MySqlConnection::class => 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
PostgresConnection::class => 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ COMMITTED'
Expand Down

0 comments on commit 43c094b

Please sign in to comment.