deal with errors being thrown on PHP 8

This commit is contained in:
Christian Flothmann 2020-09-18 10:10:16 +02:00
parent 6b8857c974
commit 6175d528e8
1 changed files with 8 additions and 0 deletions

View File

@ -108,6 +108,14 @@ class SplCaster
$a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state';
return $a;
} catch (\Error $e) {
if ('Object not initialized' !== $e->getMessage()) {
throw $e;
}
$a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state';
return $a;
}
}