10000 bug #41344 [VarDumper] Don't pass null to parse_url() (derrabus) · symfony/symfony@3dc9802 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3dc9802

Browse files
committed
bug #41344 [VarDumper] Don't pass null to parse_url() (derrabus)
This PR was merged into the 5.2 branch. Discussion ---------- [VarDumper] Don't pass null to parse_url() | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A This PR fixes a deprecation warning on PHP 8.1: > parse_url(): Passing null to parameter `#1` ($url) of type string is deprecated Commits ------- f1de7a0 [VarDumper] Don't pass null to parse_url()
2 parents b6f1667 + f1de7a0 commit 3dc9802

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/VarDumper/VarDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private static function register(): void
7171
$dumper = new CliDumper();
7272
break;
7373
case 'server' === $format:
74-
case 'tcp' === parse_url($format, \PHP_URL_SCHEME):
74+
case $format && 'tcp' === parse_url($format, \PHP_URL_SCHEME):
7575
$host = 'server' === $format ? $_SERVER['VAR_DUMPER_SERVER'] ?? '127.0.0.1:9912' : $format;
7676
$dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper();
7777
$dumper = new ServerDumper($host, $dumper, self::getDefaultContextProviders());

0 commit comments

Comments
 (0)
0