From 62b847bea39b00c4795d10443bf5105d49ff7e07 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 24 Feb 2015 05:53:55 -0500
Subject: [PATCH] Fix "PHP Fatal error: Call to a member function getMessage() on a non-object"
---
program/lib/Roundcube/rcube_smtp.php | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php
index c3a5146..b37b444 100644
--- a/program/lib/Roundcube/rcube_smtp.php
+++ b/program/lib/Roundcube/rcube_smtp.php
@@ -288,7 +288,8 @@
}
// Send the message's headers and the body as SMTP data.
- if (PEAR::isError($this->conn->data($data, $text_headers))) {
+ $result = $this->conn->data($data, $text_headers);
+ if (PEAR::isError($result)) {
$err = $this->conn->getResponse();
if (!in_array($err[0], array(354, 250, 221))) {
$msg = sprintf('[%d] %s', $err[0], $err[1]);
--
Gitblit v1.9.1