Skip to content

Commit

Permalink
Fixed an error that could occur when running the requirements checker…
Browse files Browse the repository at this point in the history
… using PHP 8+.
  • Loading branch information
angrybrad committed May 26, 2023
1 parent 9802f33 commit a099ba0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog for Craft CMS Server Check

## 2.1.5 - 2023-05-26

### Fixed
- Fixed an error that could occur when running the requirements checker using PHP 8+.

## 2.1.4 - 2022-04-16

### Added
Expand Down
2 changes: 1 addition & 1 deletion server/requirements/RequirementsChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ function getDbConnection()

if ($conn === null) {
try {
$conn = new PDO($this->dsn, $this->dbUser, $this->dbPassword);
$conn = new PDO((string)$this->dsn, $this->dbUser, $this->dbPassword);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
$conn = false;
Expand Down

0 comments on commit a099ba0

Please sign in to comment.