Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cef167

Browse files
committed
ensure string type with mbstring func overloading enabled
1 parent 6765a43 commit 6cef167

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Symfony/Component/HttpFoundation/HeaderUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public static function parseQuery(string $query, bool $ignoreBrackets = false, s
256256
private static function groupParts(array $matches, string $separators, bool $first = true): array
257257
{
258258
$separator = $separators[0];
259-
$separators = substr($separators, 1);
259+
$separators = substr($separators, 1) ?: '';
260260
$i = 0;
261261

262262
if ('' === $separators && !$first) {

src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ public function testCreate()
3232
$this->assertEquals('bar', $response->headers->get('foo'));
3333
}
3434

35+
public function testCreateWithoutConstructorArguments()
36+
{
37+
new Response();
38+
39+
$this->fail('this should not be reached');
40+
}
41+
3542
public function testToString()
3643
{
3744
$response = new Response();

0 commit comments

Comments
 (0)