Skip to content

Commit 13865a4

Browse files
committed
Fix database error not notified if misconfigured
1 parent 1154387 commit 13865a4

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/WordPress/QueryTrait.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ trait QueryTrait
2323
* and that a connection can be established.
2424
*
2525
* @return bool True if database is configured, false otherwise
26+
* @throws Exception
2627
*/
2728
public function isDatabaseConfigured(): bool
2829
{
@@ -38,11 +39,7 @@ public function isDatabaseConfigured(): bool
3839
return false;
3940
}
4041

41-
try {
42-
DB::connection()->getPdo();
43-
} catch (\Exception) {
44-
return false;
45-
}
42+
DB::connection()->getPdo();
4643

4744
return true;
4845
}

0 commit comments

Comments
 (0)