Skip to content

Commit 5ad8c2a

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Fix tests on 5.6 [Debug] Skip a test that was meant for HHVM. [Console] Silence warnings on sapi_windows_cp_set() call guard $argv + $token against null, preventing unnecessary exceptions
2 parents bf9ce8b + 1df26c2 commit 5ad8c2a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private function doAsk(OutputInterface $output, Question $question)
110110

111111
if (\function_exists('sapi_windows_cp_set')) {
112112
// Codepage used by cmd.exe on Windows to allow special characters (éàüñ).
113-
sapi_windows_cp_set(1252);
113+
@sapi_windows_cp_set(1252);
114114
}
115115

116116
if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) {

src/Symfony/Component/Console/Input/ArgvInput.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ class ArgvInput extends Input
4848
*/
4949
public function __construct(array $argv = null, InputDefinition $definition = null)
5050
{
51-
if (null === $argv) {
52-
$argv = $_SERVER['argv'];
53-
}
51+
$argv = null !== $argv ? $argv : (isset($_SERVER['argv']) ? $_SERVER['argv'] : []);
5452

5553
// strip the application name
5654
array_shift($argv);

0 commit comments

Comments
 (0)