1
1
Fork 0

Merge pull request #6114 from annando/server-discovery

Fix wrong server detecting / improved Pleroma version numbers
This commit is contained in:
Hypolite Petovan 2018-11-12 00:12:13 -05:00 committed by GitHub
commit 6e39b93eb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View file

@ -133,6 +133,11 @@ class CurlResult
{
$this->isSuccess = ($this->returnCode >= 200 && $this->returnCode <= 299) || $this->errorNumber == 0;
// Everything higher or equal 400 is not a success
if ($this->returnCode >= 400) {
$this->isSuccess = false;
}
if (!$this->isSuccess) {
Logger::log('error: ' . $this->url . ': ' . $this->returnCode . ' - ' . $this->error, Logger::INFO);
Logger::log('debug: ' . print_r($this->info, true), Logger::DATA);