Skip to content

Commit

Permalink
Added error in case the OpenSSL plugin is missing when it is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
SL-Gundam committed Jun 24, 2014
1 parent f938c80 commit cb2a2ba
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions core/mail_api.php
Expand Up @@ -1034,15 +1034,20 @@ private function cleanup_project_name( $p_project_name )
# return the hostname parsed into a hostname + port
private function prepare_mailbox_hostname()
{
if ( $this->_mailbox[ 'encryption' ] !== 'None' && extension_loaded( 'openssl' ) )
{
$this->_mailbox[ 'hostname' ] = strtolower( $this->_mailbox[ 'encryption' ] ) . '://' . $this->_mailbox[ 'hostname' ];
$t_def_mailbox_port_index = 'normal';

$t_def_mailbox_port_index = 'encrypted';
}
else
if ( $this->_mailbox[ 'encryption' ] !== 'None' )
{
$t_def_mailbox_port_index = 'normal';
if ( extension_loaded( 'openssl' ) )
{
$this->_mailbox[ 'hostname' ] = strtolower( $this->_mailbox[ 'encryption' ] ) . '://' . $this->_mailbox[ 'hostname' ];

$t_def_mailbox_port_index = 'encrypted';
}
else
{
$this->custom_error( 'OpenSSL plugin not available even though the mailbox is configured to use it. Please check whether OpenSSL is properly being loaded' );
}
}

$this->_mailbox[ 'port' ] = (int) $this->_mailbox[ 'port' ];
Expand Down

0 comments on commit cb2a2ba

Please sign in to comment.