From 997ff77ea1f378b433ba069590fc879f8cc86ab2 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 13 Mar 2015 03:50:21 -0400
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