Skip to content

Commit 30444a8

Browse files
authored
fix deprecation
1 parent e113442 commit 30444a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpFoundation/InputBag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function get(string $key, $default = null)
3535

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

38-
if (null !== $value && $this !== $value && !\is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
39-
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__);
38+
if (null !== $value && $this !== $value && !\is_scalar($value)) {
39+
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__);
4040
}
4141

4242
return $this === $value ? $default : $value;

0 commit comments

Comments
 (0)