Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d9351a4

Browse filesBrowse files
committed
[HttpClient] revert query array validadtion
1 parent 74611a9 commit d9351a4
Copy full SHA for d9351a4

File tree

2 files changed

+0
-26
lines changed
Filter options

2 files changed

+0
-26
lines changed

‎src/Symfony/Component/HttpClient/HttpClientTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/HttpClientTrait.php
-18Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -481,24 +481,6 @@ private static function mergeQueryString(?string $queryString, array $queryArray
481481
}
482482
}
483483

484-
$iterator = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($queryArray), \RecursiveIteratorIterator::SELF_FIRST);
485-
$iterator->rewind();
486-
foreach ($iterator as $v) {
487-
if (null !== $v && !is_scalar($v) && !\is_array($v)) {
488-
$depth = $iterator->getDepth();
489-
for ($path = '', $i = 0; $i <= $depth; ++$i) {
490-
if (0 != $i) {
491-
$path .= '[';
492-
}
493-
$path .= $iterator->getSubIterator($i)->key();
494-
if (0 != $i) {
495-
$path .= ']';
496-
}
497-
}
498-
throw new InvalidArgumentException(sprintf('Unsupported value for query parameter "%s": array, scalar or null expected, %s given.', $path, \gettype($v)));
499-
}
500-
}
501-
502484
if ($replace) {
503485
foreach ($queryArray as $k => $v) {
504486
if (null === $v) {

‎src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\HttpClient\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\HttpClient\Exception\InvalidArgumentException;
1615
use Symfony\Component\HttpClient\HttpClientTrait;
1716
use Symfony\Contracts\HttpClient\HttpClientInterface;
1817

@@ -148,13 +147,6 @@ public function provideParseUrl()
148147
yield [[null, null, 'bar', '?a=b&a%5Bb%20c%5D=d&e%3Df=%E2%9C%93', null], 'bar?a=b', ['a' => ['b c' => 'd'], 'e=f' => '']];
149148
}
150149

151-
public function testParseUrlException()
152-
{
153-
$this->expectException(InvalidArgumentException::class);
154-
155-
self::parseUrl('http://example.com/bar?a=b', ['a' => ['b' => new \stdClass()]]);
156-
}
157-
158150
/**
159151
* @dataProvider provideRemoveDotSegments
160152
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.