Merge branch 'wip-MDL-41196-m26' of git://github.com/samhemelryk/moodle
authorDamyon Wiese <damyon@moodle.com>
Thu, 22 Aug 2013 03:19:55 +0000 (11:19 +0800)
committerDamyon Wiese <damyon@moodle.com>
Thu, 22 Aug 2013 03:19:55 +0000 (11:19 +0800)
lib/phpmailer/moodle_phpmailer.php

index a31d3c8..01cdadc 100644 (file)
@@ -135,7 +135,7 @@ class moodle_phpmailer extends PHPMailer {
      */
     protected function PostSend() {
         // Now ask phpunit if it wants to catch this message.
-        if (phpunit_util::is_redirecting_messages()) {
+        if (PHPUNIT_TEST && phpunit_util::is_redirecting_messages()) {
             $mail = new stdClass();
             $mail->header = $this->MIMEHeader;
             $mail->body = $this->MIMEBody;