Closed joomlapl-bot closed 2 years ago
PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/38113 Poniżej zmiany w oryginale:
PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/38113 Poniżej zmiany w oryginale:
Click to expand the diff!
```diff diff --git a/administrator/components/com_installer/src/Model/LanguagesModel.php b/administrator/components/com_installer/src/Model/LanguagesModel.php index d97dccc0a319..12bdde329517 100644 --- a/administrator/components/com_installer/src/Model/LanguagesModel.php +++ b/administrator/components/com_installer/src/Model/LanguagesModel.php @@ -152,6 +152,14 @@ protected function getLanguages() } $updateSiteXML = simplexml_load_string($response->body); + + if (!$updateSiteXML) + { + Factory::getApplication()->enqueueMessage(Text::sprintf('COM_INSTALLER_MSG_ERROR_CANT_RETRIEVE_XML', $updateSite), 'error'); + + return; + } + $languages = array(); $search = strtolower($this->getState('filter.search')); diff --git a/administrator/language/en-GB/com_installer.ini b/administrator/language/en-GB/com_installer.ini index 90c1d9895ab4..245f636c802d 100644 --- a/administrator/language/en-GB/com_installer.ini +++ b/administrator/language/en-GB/com_installer.ini @@ -144,6 +144,7 @@ COM_INSTALLER_MSG_DISCOVER_NOEXTENSION="No extensions have been discover COM_INSTALLER_MSG_DISCOVER_NOEXTENSIONSELECTED="No extension selected." COM_INSTALLER_MSG_DISCOVER_PURGEDDISCOVEREDEXTENSIONS="Cleared discovered extensions." COM_INSTALLER_MSG_ERROR_CANT_CONNECT_TO_UPDATESERVER="Can't connect to %s" +COM_INSTALLER_MSG_ERROR_CANT_RETRIEVE_XML="Can't retrieve XML from %s" COM_INSTALLER_MSG_INSTALL_ENTER_A_URL="Please enter a URL" COM_INSTALLER_MSG_INSTALL_INVALID_URL="Invalid URL" COM_INSTALLER_MSG_INSTALL_INVALID_URL_SCHEME="Please enter a valid URL starting with http or https." ```