Skip to content

Commit

Permalink
fix deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg authored Jul 14, 2022
1 parent 0c81ee9 commit 0a97bed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions InputBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function get(string $key, $default = null)

$value = parent::get($key, $this);

if (null !== $value && $this !== $value && !\is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
trigger_deprecation('symfony/http-foundation', '5.1', 'Retrieving a non-string value from "%s()" is deprecated, and will throw a "%s" exception in Symfony 6.0, use "%s::all($key)" instead.', __METHOD__, BadRequestException::class, __CLASS__);
if (null !== $value && $this !== $value && !\is_scalar($value)) {
trigger_deprecation('symfony/http-foundation', '5.1', 'Retrieving a non-scalar value from "%s()" is deprecated, and will throw a "%s" exception in Symfony 6.0, use "%s::all($key)" instead.', __METHOD__, BadRequestException::class, __CLASS__);
}

return $this === $value ? $default : $value;
Expand Down

0 comments on commit 0a97bed

Please sign in to comment.