Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add warning for possibly truncated inputs in QuestionHelper (#47586)
  • Loading branch information
pbek authored and fabpot committed Sep 23, 2022
commit 806aa1b8c7e55e58b72a89a5a9c0afc04f5f5d74
5 changes: 5 additions & 0 deletions src/Symfony/Component/Console/Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,11 @@ private function getHiddenResponse(OutputInterface $output, $inputStream, bool $

$value = fgets($inputStream, 4096);

if (4095 === strlen($value)) {
$errOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output;
$errOutput->warning('The value was possibly truncated by your shell or terminal emulator');
}

if (self::$stty && Terminal::hasSttyAvailable()) {
shell_exec('stty '.$sttyMode);
}
Expand Down