Skip to content

Commit

Permalink
bugfix on non-object previous exception sent to parent constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
robfrawley committed Sep 26, 2016
1 parent 854e984 commit ee6adc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ExceptionTrait.php
Expand Up @@ -319,7 +319,7 @@ final private function compileMessagePlaceholders(string $message, array $replac
final private function filterNotThrowable(array $from) : array
{
$to = array_filter($from, function ($value) {
return !ClassInfo::isThrowableEquitable($value);
return ! ClassInfo::isThrowableEquitable($value);
});

return array_map(function ($value) {
Expand All @@ -338,7 +338,7 @@ final private function filterNotThrowable(array $from) : array
final private function filterThrowable(array $from)
{
return array_filter($from, function ($p) {
return ClassInfo::isThrowableEquitable($p);
return is_object($p) && ClassInfo::isThrowableEquitable($p);
});
}

Expand Down

0 comments on commit ee6adc1

Please sign in to comment.