From: Michael M Slusarz Date: Wed, 1 Jul 2009 06:47:34 +0000 (-0600) Subject: Remove debug; use ftell() instead of fstat() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=549a48484341114096822dc80dfb472d42ebe172;p=horde.git Remove debug; use ftell() instead of fstat() --- diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index ce6674550..6709394b7 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -409,8 +409,8 @@ class Horde_Mime_Part protected function _transferDecode($fp, $encoding) { /* If the contents are empty, return now. */ - $stat = fstat($fp); - if ($stat['size']) { + fseek($fp, 0, SEEK_END); + if (ftell($fp)) { switch ($encoding) { case 'base64': return $this->_writeStream($fp, array('filter' => 'convert.base64-decode')); @@ -1163,8 +1163,8 @@ class Horde_Mime_Part } } } else { - $stat = fstat($this->_contents); - $bytes = $stat['size']; + fseek($this->_contents, 0, SEEK_END); + $bytes = ftell($this->_contents); } return $bytes; @@ -1402,9 +1402,6 @@ class Horde_Mime_Part break; } } -// print_r($msg); - print_r($headers); - exit; $result = $mailer->send(Horde_Mime::encodeAddress($email), $headers->toArray(array('charset' => $this->getCharset())), $msg);