diff --git a/src/Symfony/Component/VarDumper/Resources/functions/dump.php b/src/Symfony/Component/VarDumper/Resources/functions/dump.php index d933bb7b10f62..a0e5addff1094 100644 --- a/src/Symfony/Component/VarDumper/Resources/functions/dump.php +++ b/src/Symfony/Component/VarDumper/Resources/functions/dump.php @@ -49,7 +49,7 @@ function dd(mixed ...$vars): never header('HTTP/1.1 500 Internal Server Error'); } - if (isset($vars[0]) && 1 === count($vars)) { + if (array_key_exists(0, $vars) && 1 === count($vars)) { VarDumper::dump($vars[0]); } else { foreach ($vars as $k => $v) { diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/functions/dd_with_multiple_args.phpt b/src/Symfony/Component/VarDumper/Tests/Dumper/functions/dd_with_multiple_args.phpt new file mode 100644 index 0000000000000..cca00c3fed1c1 --- /dev/null +++ b/src/Symfony/Component/VarDumper/Tests/Dumper/functions/dd_with_multiple_args.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test dd() with multiple args shows line number +--FILE-- + ./Tests/ + ./Tests/Dumper/functions/ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy