Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.2] in updates XML always resulted in an error #2514

Closed
jgerman-bot opened this issue Jun 28, 2022 · 0 comments · Fixed by #2516
Closed

[4.2] in updates XML always resulted in an error #2514

jgerman-bot opened this issue Jun 28, 2022 · 0 comments · Fixed by #2516

Comments

@jgerman-bot
Copy link

New language relevant PR in upstream repo: joomla/joomla-cms#38121 Here are the upstream changes:

Click to expand the diff!
diff --git a/administrator/language/en-GB/lib_joomla.ini b/administrator/language/en-GB/lib_joomla.ini
index 178145886bce..e424927663bd 100644
--- a/administrator/language/en-GB/lib_joomla.ini
+++ b/administrator/language/en-GB/lib_joomla.ini
@@ -758,3 +758,11 @@ JLIB_SIZE_PB="PiB"
 JLIB_SIZE_EB="EiB"
 JLIB_SIZE_ZB="ZiB"
 JLIB_SIZE_YB="YiB"
+
+; Database server technology types in human readable terms. Used in the Updater package.
+JLIB_DB_SERVER_TYPE_MARIADB="MariaDB"
+JLIB_DB_SERVER_TYPE_MSSQL="Microsoft SQL Server"
+JLIB_DB_SERVER_TYPE_MYSQL="MySQL"
+JLIB_DB_SERVER_TYPE_ORACLE="Oracle"
+JLIB_DB_SERVER_TYPE_POSTGRESQL="PostgreSQL"
+JLIB_DB_SERVER_TYPE_SQLITE="SQLite"
diff --git a/libraries/src/Updater/Adapter/ExtensionAdapter.php b/libraries/src/Updater/Adapter/ExtensionAdapter.php
index 59740ab424bc..f84302bdafff 100644
--- a/libraries/src/Updater/Adapter/ExtensionAdapter.php
+++ b/libraries/src/Updater/Adapter/ExtensionAdapter.php
@@ -155,10 +155,13 @@ protected function _endElement($parser, $name)
 							}
 						}
 
+						// $supportedDbs has uppercase keys because they are XML attribute names
+						$dbTypeUcase = strtoupper($dbType);
+
 						// Do we have an entry for the database?
-						if (\array_key_exists($dbType, $supportedDbs))
+						if (\array_key_exists($dbTypeUcase, $supportedDbs))
 						{
-							$minimumVersion = $supportedDbs[$dbType];
+							$minimumVersion = $supportedDbs[$dbTypeUcase];
 							$dbMatch        = version_compare($dbVersion, $minimumVersion, '>=');
 
 							if (!$dbMatch)
@@ -168,7 +171,7 @@ protected function _endElement($parser, $name)
 									'JLIB_INSTALLER_AVAILABLE_UPDATE_DB_MINIMUM',
 									$this->currentUpdate->name,
 									$this->currentUpdate->version,
-									Text::_($db->name),
+									Text::_('JLIB_DB_SERVER_TYPE_' . $dbTypeUcase),
 									$dbVersion,
 									$minimumVersion
 								);
@@ -183,7 +186,7 @@ protected function _endElement($parser, $name)
 								'JLIB_INSTALLER_AVAILABLE_UPDATE_DB_TYPE',
 								$this->currentUpdate->name,
 								$this->currentUpdate->version,
-								Text::_($db->name)
+								Text::_('JLIB_DB_SERVER_TYPE_' . $dbTypeUcase)
 							);
 
 							Factory::getApplication()->enqueueMessage($dbMsg, 'warning');
@heelc29 heelc29 changed the title in updates XML always resulted in an error [4.2] in updates XML always resulted in an error Jun 29, 2022
heelc29 added a commit to heelc29/joomla that referenced this issue Jun 29, 2022
@heelc29 heelc29 linked a pull request Jun 29, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants