Ignore:
Timestamp:
Mar 5, 2013, 10:59:00 AM (7 years ago)
Author:
cedric@…
Message:

Etre capable d'utiliser Mandrill même si cUrl pas dispo sur le serveur, ou si open_basedir/safe_mode actif (qui empechent FOLLOW_LOCATION de cUrl) en utilisant recuperer_page(). Si recuperer_page() echoue, on lance la methode native qui repose sur cUrl quand même (cas si openssl pas present sur le serveur)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/mailshot/trunk/lib/mandrill-api-php/src/Mandrill.php

    r68510 r70412  
    4646        curl_setopt($this->ch, CURLOPT_USERAGENT, 'Mandrill-PHP/1.0.11');
    4747        curl_setopt($this->ch, CURLOPT_POST, true);
    48         curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
     48              // avoid warning if safe_mode OR open_basedir
     49        @curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
    4950        curl_setopt($this->ch, CURLOPT_HEADER, false);
    5051        curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
Note: See TracChangeset for help on using the changeset viewer.