debug
This commit is contained in:
@ -25,8 +25,8 @@ class notificationFreemobile
|
||||
$ch = curl_init();
|
||||
// set url
|
||||
curl_setopt($ch, CURLOPT_URL, $this->url . $this->dest[$destinataire] . "&msg=" . urlencode(trim($message)));
|
||||
|
||||
//return the transfer as a string
|
||||
|
||||
// return the transfer as a string
|
||||
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
// $result contains the output string
|
||||
if ($this->curlErr <= 5)
|
||||
@ -42,7 +42,7 @@ class notificationFreemobile
|
||||
$error = true;
|
||||
}else
|
||||
{
|
||||
logger(DEBUG, sprintf(_("Curl return: %s when sending notification"), $result), false, __FILE__ . ":" . __LINE__);
|
||||
logger(DEBUG, sprintf(_("Curl return: %s when sending notification"), curl_error($ch)), false, __FILE__ . ":" . __LINE__);
|
||||
$this->curlErr = 0;
|
||||
}
|
||||
}else
|
||||
@ -53,12 +53,9 @@ class notificationFreemobile
|
||||
}
|
||||
$error = true;
|
||||
}
|
||||
|
||||
|
||||
//TODO managing curl errors
|
||||
// close curl resource to free up system resources
|
||||
curl_close($ch);
|
||||
|
||||
}
|
||||
return $error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user