Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
bug #781 Fix #426: Prevent fatal error during unserialization (PatchR…
Browse files Browse the repository at this point in the history
…anger)

This PR was merged into the 5.x branch.

Discussion
----------

Fix #426: Prevent fatal error during unserialization

## Description

Refer to #426 .
## Solution

I've looked for all of `__destruct()` implementations regarding cache usage. That was the only one - so it should completely fix the aforementioned issue.

Commits
-------

fb0379a Fix #426: Prevent fatal error during unserialization
  • Loading branch information
fabpot committed Feb 13, 2017
2 parents 800e32f + fb0379a commit 4341c62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/classes/Swift/Mime/SimpleMimeEntity.php
Expand Up @@ -807,7 +807,9 @@ private function _childSortAlgorithm($a, $b)
*/
public function __destruct()
{
$this->_cache->clearAll($this->_cacheKey);
if ($this->_cache instanceof Swift_KeyCache) {
$this->_cache->clearAll($this->_cacheKey);
}
}

/**
Expand Down

0 comments on commit 4341c62

Please sign in to comment.