Skip to content

Commit 8a8364c

Browse files
Merge branch '4.0'
* 4.0: Fix typos [Routing] remove useless failing mocks [appveyor] Workaround GitHub disabling of low versions of TLS Use long array syntax [Routing] Fix GC control of PHP-DSL [Routing] Don't throw 405 when scheme requirement doesn't match [Routing] Revert throwing 405 on missed slash/scheme redirections [WebProfilerBundle] fix test after ajax path updated Fix ArrayInput::toString() for InputArgument::IS_ARRAY args Update excluded_ajax_paths for sf4 Add missing use for RoleInterface Add missing use of Role [Routing] fix CS add container.autowiring.strict_mode to 3.4 docs Set controller without __invoke method from invokable class [VarDumper] Fixed PHPDoc
2 parents 4199103 + 555c8db commit 8a8364c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Input/ArrayInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function __toString()
114114
$params[] = $param.('' != $val ? '='.$this->escapeToken($val) : '');
115115
}
116116
} else {
117-
$params[] = is_array($val) ? array_map(array($this, 'escapeToken'), $val) : $this->escapeToken($val);
117+
$params[] = is_array($val) ? implode(' ', array_map(array($this, 'escapeToken'), $val)) : $this->escapeToken($val);
118118
}
119119
}
120120

Tests/Input/ArrayInputTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,8 @@ public function testToString()
170170

171171
$input = new ArrayInput(array('-b' => array('bval_1', 'bval_2'), '--f' => array('fval_1', 'fval_2')));
172172
$this->assertSame('-b=bval_1 -b=bval_2 --f=fval_1 --f=fval_2', (string) $input);
173+
174+
$input = new ArrayInput(array('array_arg' => array('val_1', 'val_2')));
175+
$this->assertSame('val_1 val_2', (string) $input);
173176
}
174177
}

0 commit comments

Comments
 (0)