Skip to content
Browse files

Fix remaining PEAR::isError checks

  • Loading branch information...
1 parent 7a6b689 commit 3cb4ecd8c4c51ddc8d7dd45a784ce984a52d50a5 @CloCkWeRX CloCkWeRX committed Apr 10, 2012
Showing with 7 additions and 21 deletions.
  1. +7 −21 Mail/Mime2.php
View
28 Mail/Mime2.php
@@ -223,7 +223,7 @@ public function getParam($name)
* the existing body, else the old body is
* overwritten
*
- * @return mixed True on success or PEAR_Error object
+ * @return mixed True on success
* @access public
*/
public function setTXTBody($data, $isfile = false, $append = false)
@@ -236,9 +236,6 @@ public function setTXTBody($data, $isfile = false, $append = false)
}
} else {
$cont = $this->_file2str($data);
- if (PEAR::isError($cont)) {
- return $cont;
- }
if (!$append) {
$this->_txtbody = $cont;
} else {
@@ -277,9 +274,6 @@ public function setHTMLBody($data, $isfile = false)
$this->_htmlbody = $data;
} else {
$cont = $this->_file2str($data);
- if (PEAR::isError($cont)) {
- return $cont;
- }
$this->_htmlbody = $cont;
}
@@ -327,9 +321,7 @@ public function addHTMLImage($file,
$filedata = null;
$bodyfile = $file;
} else {
- if (PEAR::isError($filedata = $this->_file2str($file))) {
- return $filedata;
- }
+ $filedata = $this->_file2str($file);
}
$filename = ($name ? $name : $file);
} else {
@@ -379,7 +371,7 @@ public function addHTMLImage($file,
* @param string $h_charset The character set of the headers e.g. filename
* If not specified, $charset will be used
*
- * @return mixed True on success or PEAR_Error object
+ * @return mixed True on success
* @access public
*/
public function addAttachment($file,
@@ -404,9 +396,7 @@ public function addAttachment($file,
$filedata = null;
$bodyfile = $file;
} else {
- if (PEAR::isError($filedata = $this->_file2str($file))) {
- return $filedata;
- }
+ $filedata = $this->_file2str($file);
}
// Force the name the user supplied, otherwise use $file
$filename = ($name ? $name : $file);
@@ -688,7 +678,7 @@ private function _addAttachmentPart($obj, $value)
* See that function for more info.
* @param bool $overwrite Overwrite the existing headers with new.
*
- * @return mixed The complete e-mail or PEAR error object
+ * @return mixed The complete e-mail
* @access public
*/
public function getMessage($separation = null, $params = null, $headers = null,
@@ -700,10 +690,6 @@ public function getMessage($separation = null, $params = null, $headers = null,
$body = $this->get($params);
- if (PEAR::isError($body)) {
- return $body;
- }
-
$head = $this->txtHeaders($headers, $overwrite);
$mail = $head . $separation . $body;
return $mail;
@@ -716,7 +702,7 @@ public function getMessage($separation = null, $params = null, $headers = null,
* @param array $params The Build parameters passed to the
* &get() function. See &get for more info.
*
- * @return mixed The e-mail body or PEAR error object
+ * @return mixed The e-mail body
* @access public
* @since 1.6.0
*/
@@ -736,7 +722,7 @@ public function getMessageBody($params = null)
* See that function for more info.
* @param bool $overwrite Overwrite the existing headers with new.
*
- * @return mixed True or PEAR error object
+ * @return mixed True
* @access public
* @since 1.6.0
* @throws InvalidArgumentException

0 comments on commit 3cb4ecd

Please sign in to comment.
Something went wrong with that request. Please try again.