Skip to content

Commit

Permalink
minor #38227 [VarDumper] deal with errors being thrown on PHP 8 (xabbuh)
Browse files Browse the repository at this point in the history
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
-------

6175d52 deal with errors being thrown on PHP 8
  • Loading branch information
xabbuh committed Sep 18, 2020
2 parents 6b8857c + 6175d52 commit ba65757
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Symfony/Component/VarDumper/Caster/SplCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNe

$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;
}
}
Expand Down

0 comments on commit ba65757

Please sign in to comment.