Selaa lähdekoodia

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 20 vuotta sitten
vanhempi
commit
53fe64165f
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  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);