Fix call order of curl_close() and curl_error()
This commit is contained in:
parent
4f884d43e6
commit
aee1a49a25
1 changed files with 4 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue