Closed dadowl closed 2 years ago
Annotation off?? can
function curl($url){
if (preg_match('/^https?:\/\//', $url)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'The SkinSystem');
$response = curl_exec($ch);
curl_close($ch);
if($response === false){
//printErrorAndDie(str_replace("%err%", curl_error($ch), L::gnrl_crlerr));
<<<<< this
}
return($response);
} else {
return(file_get_contents($url));
}
}
https://github.com/SkinsRestorer/SkinSystem/pull/120
I'm still waiting for the pull request to be accepted.
Hey! Noticed such an error. The printErrorAndDie() method has a check to see if https://status.mojang.com/check is working. But on October 8, 2021, the service was closed (https://wiki.vg/Mojang_API#API_Status_.28Removed.29). I had to spend about 2 hours to figure out why nothing happens after an incorrect authorization, server resources begin to be consumed and, as a result, the request returns a 504 error, but it turned out that's the point. It seems to me that this check should be removed, or replaced with another similar API for new versions of SkinSystem.