diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5de8e..db1fad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/server/requirements/RequirementsChecker.php b/server/requirements/RequirementsChecker.php index 140ed7f..d9c4bc8 100644 --- a/server/requirements/RequirementsChecker.php +++ b/server/requirements/RequirementsChecker.php @@ -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;