From 619cfb2df29300f051387edc3c95e1be124a4e27 Mon Sep 17 00:00:00 2001
From: till <till@php.net>
Date: Mon, 25 Feb 2008 05:17:35 -0500
Subject: [PATCH] * introduced isset() because that is how you test if a var is set (which is why a NOTICE is a good idea to look at sometimes) * fixed a bug - $smtp_conn was checked, but it's actually called $SMTP_CONN, now the connection is really being re-used
---
program/include/rcube_smtp.inc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/program/include/rcube_smtp.inc b/program/include/rcube_smtp.inc
index f140274..2c47474 100644
--- a/program/include/rcube_smtp.inc
+++ b/program/include/rcube_smtp.inc
@@ -62,19 +62,19 @@
$smtp_host_url = parse_url($CONFIG['smtp_server']);
// overwrite port
- if ($smtp_host_url['host'] && $smtp_host_url['port'])
+ if (isset($smtp_host_url['host']) && isset($smtp_host_url['port']))
{
$smtp_host = $smtp_host_url['host'];
$smtp_port = $smtp_host_url['port'];
}
// re-write smtp host
- if ($smtp_host_url['host'] && $smtp_host_url['scheme'])
+ if (isset($smtp_host_url['host']) && isset($smtp_host_url['scheme']))
$smtp_host = sprintf('%s://%s', $smtp_host_url['scheme'], $smtp_host_url['host']);
// create Net_SMTP object and connect to server
- if (!is_object($smtp_conn))
+ if (!is_object($SMTP_CONN))
{
$helo_host = empty($CONFIG['smtp_helo_host']) ? (empty($_SERVER['SERVER_NAME']) ? 'localhost' : $_SERVER['SERVER_NAME']) : $CONFIG['smtp_helo_host'];
$SMTP_CONN = new Net_SMTP($smtp_host, $smtp_port, $helo_host);
--
Gitblit v1.9.1