Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 10, 2022
1 parent 29b6826 commit bffd767
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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.1 - 2022-02-10

### Fixed
- Fixed a bug where the MariaDB version wasn’t always being parsed correctly. ([craftcms/cms#10456](https://github.com/craftcms/cms/issues/10456))

## 2.1.0 - 2022-02-09

### Changed
Expand Down
6 changes: 3 additions & 3 deletions server/requirements/requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
);
if ($conn !== false) {
$version = $conn->getAttribute(PDO::ATTR_SERVER_VERSION);
if (strpos($version, 'MariaDB') !== false) {
if (preg_match('/[\d.]+-([\d.]+)-\bMariaDB\b/', $version, $match)) {
$name = 'MariaDB';
$version = preg_replace('/^.*?MariaDB.*?:/', '', $version);
$version = $match[1];
$requiredVersion = $this->requiredMariaDbVersion;
$tzUrl = 'https://mariadb.com/kb/en/time-zones/#mysql-time-zone-tables';
} else {
Expand All @@ -39,7 +39,7 @@
'name' => "{$name} {$requiredVersion}+",
'mandatory' => true,
'condition' => version_compare($version, $requiredVersion, '>='),
'memo' => "{$name} {$this->requiredMySqlVersion} or higher is required to run Craft CMS.",
'memo' => "{$name} {$requiredVersion} or higher is required to run Craft CMS.",
);
$requirements[] = array(
'name' => "{$name} InnoDB support",
Expand Down

0 comments on commit bffd767

Please sign in to comment.