# Fatal error: Call to a member function clearAll()

**URL:** https://forum.mautic.org/t/fatal-error-call-to-a-member-function-clearall/4147
**Category:** Product Support
**Created:** [June 29, 2016, 2:59pm UTC](https://forum.mautic.org/t/fatal-error-call-to-a-member-function-clearall/4147 "2016-06-29T14:59:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AndreD](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@AndreD](https://forum.mautic.org/u/AndreD)
#### Post date: [June 29, 2016, 2:59pm UTC](https://forum.mautic.org/t/fatal-error-call-to-a-member-function-clearall/4147/1 "2016-06-29T14:59:31Z")

</div>

Hi!  
  
In my cron job mautic:email:process, I'm having this report error:  
Fatal error: Call to a member function clearAll() on a non-object in /home/imperiosoftcom/public\_html/sismail/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 830  
  
I did a simple search and found nothing about this.  
  
How can I resolve this?

---

<div class="post-metadata">

### Author: ![AndreD](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@AndreD](https://forum.mautic.org/u/AndreD)
#### Post date: [June 30, 2016, 5:25pm UTC](https://forum.mautic.org/t/fatal-error-call-to-a-member-function-clearall/4147/2 "2016-06-30T17:25:58Z")

</div>

I rounded the error with some glitch

`/**
     * Empties it's own contents from the cache.
     */
    public function __destruct()
    {
        if(!empty($this->_cacheKey)){
            $this->_cache->clearAll($this->_cacheKey);
        }
    }`

To

`/**
     * Empties it's own contents from the cache.
     */
    public function __destruct()
    {
        if(!empty($this->_cacheKey)){
            $this->_cache->clearAll($this->_cacheKey);
        }
    }`

Now I’m getting the related error:

Catchable fatal error: Argument 1 passed to Swift\_Transport\_MailTransport::send() must implement interface Swift\_Mime\_Message, boolean given, called in /home/imperiosoftcom/public\_html/sismail/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php on line 169 and defined in /home/imperiosoftcom/public\_html/sismail/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php on line 108

How fix that?

---

<div class="post-metadata">

### Author: ![AndreD](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@AndreD](https://forum.mautic.org/u/AndreD)
#### Post date: [June 29, 2016, 2:59pm UTC](https://forum.mautic.org/t/fatal-error-call-to-a-member-function-clearall/4147/3 "2016-06-29T14:59:32Z")

</div>

Hi!

In my cron job mautic:email:process, I’m having this report error:  
Fatal error: Call to a member function clearAll() on a non-object in /home/imperiosoftcom/public\_html/sismail/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 830

I did a simple search and found nothing about this.

How can I resolve this?
