diff --git a/installation/language/en-GB/en-GB.ini b/installation/language/en-GB/en-GB.ini index d4eb8d903e61e..baff03ada5a7e 100644 --- a/installation/language/en-GB/en-GB.ini +++ b/installation/language/en-GB/en-GB.ini @@ -180,6 +180,7 @@ INSTL_DATABASE_FIELD_VALUE_BACKUP="Backup" INSTL_DATABASE_FIX_LOWERCASE="The table prefix must be lowercase for PostgreSQL." INSTL_DATABASE_FIX_TOO_LONG="The MySQL table prefix must be a maximum of 15 characters." INSTL_DATABASE_INVALID_DB_DETAILS="The database details provided are incorrect and/or empty." +INSTL_DATABASE_INVALID_MARIADB_VERSION="You need MariaDB %1$s or higher to continue the installation. Your version is: %2$s" INSTL_DATABASE_INVALID_MYSQL_VERSION="You need MySQL %1$s or higher to continue the installation. Your version is: %2$s" INSTL_DATABASE_INVALID_MYSQLI_VERSION="You need MySQL %1$s or higher to continue the installation. Your version is: %2$s" INSTL_DATABASE_INVALID_PGSQL_VERSION="You need PostgreSQL %1$s or higher to continue the installation. Your version is: %2$s" diff --git a/installation/language/en-US/en-US.ini b/installation/language/en-US/en-US.ini index 9b41a74261aa3..3bad1d2e8d88a 100644 --- a/installation/language/en-US/en-US.ini +++ b/installation/language/en-US/en-US.ini @@ -180,6 +180,7 @@ INSTL_DATABASE_FIELD_VALUE_BACKUP="Backup" INSTL_DATABASE_FIX_LOWERCASE="The table prefix must be lowercase for PostgreSQL." INSTL_DATABASE_FIX_TOO_LONG="The MySQL table prefix must be a maximum of 15 characters." INSTL_DATABASE_INVALID_DB_DETAILS="The database details provided are incorrect and/or empty." +INSTL_DATABASE_INVALID_MARIADB_VERSION="You need MariaDB %1$s or higher to continue the installation. Your version is: %2$s" INSTL_DATABASE_INVALID_MYSQL_VERSION="You need MySQL %1$s or higher to continue the installation. Your version is: %2$s" INSTL_DATABASE_INVALID_MYSQLI_VERSION="You need MySQL %1$s or higher to continue the installation. Your version is: %2$s" INSTL_DATABASE_INVALID_PGSQL_VERSION="You need PostgreSQL %1$s or higher to continue the installation. Your version is: %2$s" diff --git a/installation/src/Model/DatabaseModel.php b/installation/src/Model/DatabaseModel.php index 14b36afb30d09..6746dd61b7be9 100644 --- a/installation/src/Model/DatabaseModel.php +++ b/installation/src/Model/DatabaseModel.php @@ -405,7 +405,14 @@ public function createDatabase($options) if (!$db->isMinimumVersion()) { - throw new \RuntimeException(Text::sprintf('INSTL_DATABASE_INVALID_' . strtoupper($type) . '_VERSION', $db->getMinimum(), $db_version)); + if (in_array($type, ['mysql', 'mysqli']) && $db->isMariaDb()) + { + throw new \RuntimeException(Text::sprintf('INSTL_DATABASE_INVALID_MARIADB_VERSION', $db->getMinimum(), $db_version)); + } + else + { + throw new \RuntimeException(Text::sprintf('INSTL_DATABASE_INVALID_' . strtoupper($type) . '_VERSION', $db->getMinimum(), $db_version)); + } } // @internal Check for spaces in beginning or end of name.