Explorar o código

Fixed a few warning messages I ran into today when SMTP had died. We already output nice SMTP error messages, so no need to have the PHP code display its own errors.
Also, the property dlv_server_msg was only being set in the errorCheck function, which was never ran if the socket connection failed, so we would get an undefined error.

Jimmy Conner %!s(int64=20) %!d(string=hai) anos
pai
achega
53fe64165f
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      class/deliver/Deliver_SMTP.class.php

+ 3 - 2
class/deliver/Deliver_SMTP.class.php

@@ -52,14 +52,15 @@ class Deliver_SMTP extends Deliver {
         }
 
         if (($use_smtp_tls == true) and (check_php_version(4,3)) and (extension_loaded('openssl'))) {
-            $stream = fsockopen('tls://' . $host, $port, $errorNumber, $errorString);
+            $stream = @fsockopen('tls://' . $host, $port, $errorNumber, $errorString);
         } else {
-            $stream = fsockopen($host, $port, $errorNumber, $errorString);
+            $stream = @fsockopen($host, $port, $errorNumber, $errorString);
         }
 
         if (!$stream) {
             $this->dlv_msg = $errorString;
             $this->dlv_ret_nr = $errorNumber;
+            $this->dlv_server_msg = '';
             return(0);
         }
         $tmp = fgets($stream, 1024);