Skip to content

Commit

Permalink
Merge branch '5.0' into 5.1
Browse files Browse the repository at this point in the history
* 5.0:
  Fix abstract method name in PHP doc block
  Various cleanups
  [HttpClient] fix issues in tests
  Fixes sprintf(): Too few arguments in form transformer
  [Console] Fix QuestionHelper::disableStty()
  [Validator] Use Mime component to determine mime type for file validator
  validate subforms in all validation groups
  Update Hungarian translations
  Add meaningful message when Process is not installed (ProcessHelper)
  [PropertyAccess] Fix TypeError parsing again.
  [TwigBridge] fix fallback html-to-txt body converter
  [Security/Http] fix merge
  [ErrorHandler] fix setting $trace to null in FatalError
  [Form] add missing Czech validators translation
  [Validator] add missing Czech translations
  never directly validate Existence (Required/Optional) constraints
  • Loading branch information
nicolas-grekas committed May 30, 2020
2 parents 37556ec + d98fc46 commit 7d0b927
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Error/FatalError.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ public function __construct(string $message, int $code, array $error, int $trace
'line' => $error['line'],
'trace' => $trace,
] as $property => $value) {
$refl = new \ReflectionProperty(\Error::class, $property);
$refl->setAccessible(true);
$refl->setValue($this, $value);
if (null !== $value) {
$refl = new \ReflectionProperty(\Error::class, $property);
$refl->setAccessible(true);
$refl->setValue($this, $value);
}
}
}

Expand Down

0 comments on commit 7d0b927

Please sign in to comment.