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
This commit is contained in:
Fabien Potencier 2020-09-09 07:14:20 +02:00
commit 5ad8c2a630
2 changed files with 2 additions and 4 deletions

View File

@ -110,7 +110,7 @@ class QuestionHelper extends Helper
if (\function_exists('sapi_windows_cp_set')) {
// Codepage used by cmd.exe on Windows to allow special characters (éàüñ).
sapi_windows_cp_set(1252);
@sapi_windows_cp_set(1252);
}
if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) {

View File

@ -48,9 +48,7 @@ class ArgvInput extends Input
*/
public function __construct(array $argv = null, InputDefinition $definition = null)
{
if (null === $argv) {
$argv = $_SERVER['argv'];
}
$argv = null !== $argv ? $argv : (isset($_SERVER['argv']) ? $_SERVER['argv'] : []);
// strip the application name
array_shift($argv);