From d073c3550d8fd1a80703340735290877f8718055 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Oct 2009 11:27:26 +0200 Subject: [PATCH] Added check for error return from KTAPIDocument email function so that the client tools webservices indicate an error to the client tools instead of just assuming success. --- webservice/clienttools/services/3.6.1/kt.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webservice/clienttools/services/3.6.1/kt.php b/webservice/clienttools/services/3.6.1/kt.php index b93f28b..0f70e91 100644 --- a/webservice/clienttools/services/3.6.1/kt.php +++ b/webservice/clienttools/services/3.6.1/kt.php @@ -982,7 +982,11 @@ class kt extends client_service { $this->setResponse(array('status'=>'norecipients')); return false; }else{ - $document->email($recipientsList, $message, TRUE); // true to attach document + $result = $document->email($recipientsList, $message, TRUE); // true to attach document + if (PEAR::isError($result)) { + $this->setResponse(array('status'=>$result->getMessage()));; + return false; + } $this->setResponse(array('status'=>'documentemailed')); } return true; -- libgit2 0.21.4