diff --git a/Message/Mail/Smtp.php b/Message/Mail/Smtp.php index 86a2532c8..70ae37514 100644 --- a/Message/Mail/Smtp.php +++ b/Message/Mail/Smtp.php @@ -172,7 +172,7 @@ class Smtp if ($streamok) { $socketContext = \stream_context_create($options); - $connection = \stream_socket_client($host . ':' . $port, $errno, $errstr, $timeout, \STREAM_CLIENT_CONNECT, $socketContext); + $connection = @\stream_socket_client($host . ':' . $port, $errno, $errstr, $timeout, \STREAM_CLIENT_CONNECT, $socketContext); } else { //Fall back to fsockopen which should work in more places, but is missing some features $connection = \fsockopen($host, $port, $errno, $errstr, $timeout); @@ -313,11 +313,11 @@ class Smtp return $this->sendCommand('Username', \base64_encode($response), 235); case 'XOAUTH2': //The OAuth instance must be set up prior to requesting auth. - if ($OAuth === null) { + if ($oauth === null) { return false; } - $oauth = $OAuth->getOauth64(); + $oauth = $oauth->getOauth64(); if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { return false; } diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php index d68cf733c..64fca6dba 100644 --- a/System/File/Ftp/Directory.php +++ b/System/File/Ftp/Directory.php @@ -419,7 +419,11 @@ class Directory extends FileAbstract implements DirectoryInterface } $tempName = \tempnam(\sys_get_temp_dir(), 'omsftp_'); - $status = @\mkdir($tempName); + if ($tempName === false) { + return false; + } + + $status = @\mkdir($tempName); if ($status === false) { return false; }