Skip to content

Commit 6245bac

Browse files
authored
Revert removal of Stringable check
1 parent de23ac8 commit 6245bac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/InputBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function get(string $key, $default = null)
3535

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

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

0 commit comments

Comments
 (0)