mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-04 15:44:07 +01:00
* [DEV] More info on CURL error
This commit is contained in:
@@ -259,8 +259,14 @@ class Util
|
||||
|
||||
$data = curl_exec($ch);
|
||||
|
||||
if ($data === false) {
|
||||
$Log = Log::writeNewLog(__FUNCTION__, curl_error($ch));
|
||||
$httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ($data === false || $httpStatus !== 200) {
|
||||
$Log = new Log(__FUNCTION__);
|
||||
$Log->setLogLevel(Log::ERROR);
|
||||
$Log->addDescription(curl_error($ch));
|
||||
$Log->addDetails(_('Respuesta'), $httpStatus);
|
||||
$Log->writeLog();
|
||||
|
||||
throw new SPException(SPException::SP_WARNING, $Log->getDescription());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user