Stop message: 'end() expects parameter 1 to be array, null given'

```PHP
PHP Warning: end() expects parameter 1 to be array, null given in ../libraries/legacy/exception/exception.php on line 280
```

Every time I need send email globally I get this message.