minor #38227 [VarDumper] deal with errors being thrown on PHP 8 (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] deal with errors being thrown on PHP 8

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

6175d528e8 deal with errors being thrown on PHP 8
This commit is contained in:
Christian Flothmann 2020-09-18 10:32:31 +02:00
commit ba6575752a
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;
}
}