Skip to content

Commit c455f54

Browse files
committed
Merge branch '6.4' into 7.3
* 6.4: Restore Relay 8.5 test account for PHP_ZTS being a boolean value on PHP 8.4+ [Intl] Update data to ICU 78.1 [Console] Fix exception message when abbreviation matches multiple hidden commands [FrameworkBundle] Fix TypeError when traversing scalar values in debug:config [DependencyInjection] Fix loop corruption in CheckTypeDeclarationsPass [DependencyInjection] Fix invalid PHP syntax for nullable TypedReference in PhpDumper Fix typo in comment [Translation][Routing] Fix typos [String] Fix normalization in trimPrefix/trimSuffix
2 parents c3f0978 + 55a926f commit c455f54

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Command/ConfigDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private function getConfigForPath(array $config, string $path, string $alias): m
161161
$steps = explode('.', $path);
162162

163163
foreach ($steps as $step) {
164-
if (!\array_key_exists($step, $config)) {
164+
if (!\is_array($config) || !\array_key_exists($step, $config)) {
165165
throw new LogicException(\sprintf('Unable to find configuration for "%s.%s".', $alias, $path));
166166
}
167167

Tests/Functional/ConfigDebugCommandTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,16 @@ public static function provideCompletionSuggestions(): \Generator
264264
yield 'option --format, debug' => [true, ['--format', ''], ['yaml', 'json']];
265265
}
266266

267+
public function testDumpPathDeepIntoScalar()
268+
{
269+
$tester = $this->createCommandTester(true);
270+
271+
$tester->execute(['name' => 'framework', 'path' => 'secret.foo']);
272+
273+
$this->assertSame(1, $tester->getStatusCode());
274+
$this->assertStringContainsString('Unable to find configuration for "framework.secret.foo"', $tester->getDisplay());
275+
}
276+
267277
private function createCommandTester(bool $debug): CommandTester
268278
{
269279
$command = $this->createApplication($debug)->find('debug:config');

0 commit comments

Comments
 (0)