diff --git a/administrator/components/com_joomlaupdate/models/default.php b/administrator/components/com_joomlaupdate/models/default.php index bc437e9088551..c40faad3e99ac 100644 --- a/administrator/components/com_joomlaupdate/models/default.php +++ b/administrator/components/com_joomlaupdate/models/default.php @@ -164,13 +164,28 @@ public function getUpdateInformation() if (is_null($updateObject)) { + // We have not found any update in the database we seem to run the latest version $ret['latest'] = JVERSION; return $ret; } - $ret['latest'] = $updateObject->version; - $ret['hasUpdate'] = $updateObject->version != JVERSION; + // Check whether this is a valid update or not + if (version_compare($updateObject->version, JVERSION, '<')) + { + // This update points to an outdated version we should not offer to update to this + $ret['latest'] = JVERSION; + + return $ret; + } + + $ret['latest'] = $updateObject->version; + + // Check whether this is an update or not. + if (version_compare($updateObject->version, JVERSION, '>')) + { + $ret['hasUpdate'] = true; + } // Fetch the full update details from the update details URL. jimport('joomla.updater.update');