Fix call order of curl_close() and curl_error()

This commit is contained in:
Visman 2023-05-16 17:34:28 +07:00
parent 4f884d43e6
commit aee1a49a25

View file

@ -1253,15 +1253,13 @@ class Files
$result = \curl_exec($ch);
\curl_close($ch);
if (false === $result) {
$this->error = 'cURL error: ' . \curl_error($ch);
return false;
} else {
return true;
}
\curl_close($ch);
return false !== $result;
}
/**