mapos
mapos copied to clipboard
Erro ao atualizar para versão 4.83-4.90
Ao ir em Configurações -> Sistema e clicar em "Atualizar Mapos", está gerando um erro assim que clica em OK no navegador. Google Chrome Versão 81.0.4044.129 (Versão oficial) 64 bits
C:\xampp\htdocs\mapos-master\application\libraries\Github_updater.php }
return false;
}
private function _connect($url)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC) ;
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'User-Agent: Mapos'
]);
$response = curl_exec($ch);
if (curl_errno($ch)) {
throw new Exception(curl_error($ch));
}
curl_close($ch);
return $response;
}
/**
* Get the latest commit hash of the branch that it needs to update from.
*
* @return string The branch to update from latest commit hash.
*/
private function getCurrentCommitHash()
{
$branches = json_decode(
$this->_connect(self::API_URL.$this->ci->config->item('github_user').'/'.$this->ci->config->item('github_repo').'/branches')
);
$branchToUpdateFrom = current(
array_filter($branches, function ($branch) {

A lib do atualizador está com alguns problemas, recomendo realizar a atualização manualmente.