Fixed bug #16231: Mail not sent if safe mode is on (Thanks to Boris Gulay)
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 31 Dec 2010 11:51:57 +0000 (11:51 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 31 Dec 2010 11:51:57 +0000 (11:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9974 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/utility/class.t3lib_utility_mail.php

index 6d90097..21f470e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,19 @@
+2010-12-31  Christian Kuhn  <lolli@schwarzbu.ch>
+
+       * Fixed bug #16231: Mail not sent if safe mode is on (Thanks to Boris Gulay)
+
 2010-12-30  Steffen Gebert  <steffen@steffen-gebert.de>
 
        * Added feature #16580: render-postProcess Hook in t3lib_PageRenderer::render() (Thanks to Morton Jonuschat)
        * Fixed bug #13245: Render Access Lists settings in be_groups configuration as checkboxes (Thanks to Simon Schaufelberger)
 
-2010-12-29  Christian Kuuhn  <lolli@schwarzbu.ch>
+2010-12-30  Christian Kuuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #15034: Login to backend fails with IPv6 Address as HTTP_HOST (Thanks to Roland Schenke)
        * Fixed bug #10480: Add missing header in auto_respond_msg (Thanks to Christian Buelter)
+
+2010-12-29  Christian Kuuhn  <lolli@schwarzbu.ch>
+
        * Fixed bug #16849: [Unit tests] fixPermissions* tests rely on availability of posix_getegid() (Thanks to Steffen Gebert)
        * Fixed bug #11286: Caching of pagesections uses superfluos serialize() call (Thanks to Rupert Germann)
 
index 9e86795..b089dff 100644 (file)
@@ -66,7 +66,15 @@ final class t3lib_utility_Mail {
                                $success = $success && t3lib_div::callUserFunction($hookMethod, $parameters, $fakeThis);
                        }
                } else {
-                       $success = @mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
+                       if (t3lib_utility_PhpOptions::isSafeModeEnabled() && !is_null($additionalParameters)) {
+                               $additionalParameters = null;
+                       }
+
+                       if (is_null($additionalParameters)) {
+                               $success = @mail($to, $subject, $messageBody, $additionalHeaders);
+                       } else {
+                               $success = @mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
+                       }
                }
 
                if (!$success) {