Better error logging
rodzic
0f755b4d97
commit
dc533a57d0
|
@ -1063,7 +1063,8 @@ HTML;
|
||||||
// Check for errors
|
// Check for errors
|
||||||
if( curl_errno( $ch ) ) {
|
if( curl_errno( $ch ) ) {
|
||||||
$timestamp = ( new DateTime() )->format( DATE_RFC3339_EXTENDED );
|
$timestamp = ( new DateTime() )->format( DATE_RFC3339_EXTENDED );
|
||||||
file_put_contents( $directories["logs"] . "/{$timestamp}.Error.txt", curl_error( $ch ) );
|
$error_message = curl_error( $ch ) . "\ninbox: {$inbox}\nmessage: " . json_encode($message);
|
||||||
|
file_put_contents( $directories["logs"] . "/{$timestamp}.Error.txt", $error_message );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
curl_close( $ch );
|
curl_close( $ch );
|
||||||
|
|
Ładowanie…
Reference in New Issue