Changeset 95507 in spip-zone


Ignore:
Timestamp:
Feb 26, 2016, 10:46:51 AM (4 years ago)
Author:
cedric@…
Message:

Loger les reponses en erreurs y compris si http status est en 4xx ou 5xx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/mailshot/trunk/lib/mailjet-api-php/mailjet-3.php

    r95504 r95507  
    6666                $return = ($result===true) ? $this->_response : false;
    6767
    68                 if (isset($return['StatusCode'])
    69                   AND intval($return['StatusCode']/100)>2){
     68                if (isset($this->_response['StatusCode'])){
    7069                        $url_log = "api.mailjet.com/".$this->apiVersion.$this->_method;
    71                         spip_log("$url_log : status ".$return['StatusCode']." - ".$return['ErrorInfo'].", ".$return['ErrorMessage'],'mailshot'._LOG_INFO_IMPORTANTE);
     70                        spip_log("$url_log : status ".$this->_response['StatusCode']." - ".$this->_response['ErrorInfo'].", ".$this->_response['ErrorMessage'],'mailshot'._LOG_INFO_IMPORTANTE);
    7271                }
    7372
Note: See TracChangeset for help on using the changeset viewer.