Skip to content

Commit

Permalink
[mms] Fix fatal error if using TNEF viewer and bcmath extension is no…
Browse files Browse the repository at this point in the history
…t installed on the system.
  • Loading branch information
slusarz committed Mar 21, 2014
1 parent 4b7252c commit c880f39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions framework/Mime_Viewer/lib/Horde/Mime/Viewer/Tnef.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ public function __construct(Horde_Mime_Part $part, array $conf = array())
protected function _getEmbeddedMimeParts()
{
/* Get the data from the attachment. */
if (!($tnef = $this->getConfigParam('tnef'))) {
$tnef = Horde_Compress::factory('Tnef');
$this->setConfigParam('tnef', $tnef);
try {
if (!($tnef = $this->getConfigParam('tnef'))) {
$tnef = Horde_Compress::factory('Tnef');
$this->setConfigParam('tnef', $tnef);
}
$tnefData = $tnef->decompress($this->_mimepart->getContents());
} catch (Horde_Compress_Exception $e) {
$tnefData = array();
}
$tnefData = $tnef->decompress($this->_mimepart->getContents());

if (!count($tnefData)) {
return null;
Expand Down
4 changes: 2 additions & 2 deletions framework/Mime_Viewer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] Fix fatal error if using TNEF viewer and bcmath extension is not installed on the system.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -997,7 +997,7 @@
<date>2013-05-28</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] Fix fatal error if using TNEF viewer and bcmath extension is not installed on the system.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit c880f39

Please sign in to comment.