Skip to content

Commit

Permalink
Removed safe_mode support. Removed from PHP 5.4.0 and later
Browse files Browse the repository at this point in the history
  • Loading branch information
vidarl committed Apr 3, 2019
1 parent 50ebb06 commit 6dbcc84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 0 additions & 6 deletions lib/ezutils/classes/ezfiletransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ function sendMail( eZMail $mail )
if ( !eZMail::validate( $emailSender ) )
$emailSender = false;

$isSafeMode = ini_get( 'safe_mode' );
if ( $isSafeMode and
$emailSender and
$mail->sender() == false )
$mail->setSenderText( $emailSender );

$filename = time() . '-' . mt_rand() . '.mail';

$data = preg_replace('/(\r\n|\r|\n)/', "\r\n", $mail->headerText() . "\n" . $mail->body() );
Expand Down
8 changes: 2 additions & 6 deletions lib/ezutils/classes/ezsendmailtransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,15 @@ function sendMail( eZMail $mail )
if ( !eZMail::validate( $emailSender ) )
$emailSender = false;

$isSafeMode = ini_get( 'safe_mode' ) != 0;

$sendmailOptionsArray = $ini->variable( 'MailSettings', 'SendmailOptions' );
if( is_array($sendmailOptionsArray) )
$sendmailOptions = implode( ' ', $sendmailOptionsArray );
elseif( !is_string($sendmailOptionsArray) )
$sendmailOptions = $sendmailOptionsArray;
if ( !$isSafeMode and
$emailSender )
if ( $emailSender )
$sendmailOptions .= ' -f'. $emailSender;

if ( $isSafeMode and
$emailSender and
if ( $emailSender and
$mail->sender() == false )
$mail->setSenderText( $emailSender );

Expand Down

0 comments on commit 6dbcc84

Please sign in to comment.