Переглянути джерело

Merge pull request #459 from adamnicholson/master

Fix to ensure API response isn't output directly when using MandrillHandler
Jordi Boggiano 11 роки тому
батько
коміт
cbbd378b32
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      src/Monolog/Handler/MandrillHandler.php

+ 1 - 0
src/Monolog/Handler/MandrillHandler.php

@@ -56,6 +56,7 @@ class MandrillHandler extends MailHandler
 
 
         curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json');
         curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json');
         curl_setopt($ch, CURLOPT_POST, 1);
         curl_setopt($ch, CURLOPT_POST, 1);
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
         curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
             'key' => $this->apiKey,
             'key' => $this->apiKey,
             'raw_message' => (string) $message,
             'raw_message' => (string) $message,