From 62b847bea39b00c4795d10443bf5105d49ff7e07 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 24 Feb 2015 11:53:55 +0100 Subject: Fix "PHP Fatal error: Call to a member function getMessage() on a non-object" --- program/lib/Roundcube/rcube_smtp.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'program/lib/Roundcube') diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php index c3a51467b..b37b44426 100644 --- a/program/lib/Roundcube/rcube_smtp.php +++ b/program/lib/Roundcube/rcube_smtp.php @@ -288,7 +288,8 @@ class rcube_smtp } // 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]); -- cgit v1.2.3