Skip to content

Commit f718936

Browse files
authored
Reset should not trigger setDefaultException error (#50)
1 parent 6eff6e4 commit f718936

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## 1.4.0 -
44

5+
### Fixed
6+
- `reset()` should not trigger `setDefaultException` error condition
7+
8+
### Breaking
59
- drop support for PHP 5 and 7.0
610

711
## 1.3.1 - 2019-11-06

Diff for: src/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function addException(\Exception $exception)
176176
*/
177177
public function setDefaultException(\Exception $defaultException = null)
178178
{
179-
if (!$defaultException instanceof Exception) {
179+
if (null !== $defaultException && !$defaultException instanceof Exception) {
180180
@trigger_error('Clients may only throw exceptions of type '.Exception::class.'. Setting an exception of class '.get_class($defaultException).' will not be possible anymore in the future', E_USER_DEPRECATED);
181181
}
182182
$this->defaultException = $defaultException;

0 commit comments

Comments
 (0)