Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3905589

Browse files
[Console] Fix empty COLUMNS/LINES env vars
1 parentbda7e6b commit3905589

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/Symfony/Component/Console/Application.php‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ public function setDispatcher(EventDispatcherInterface $dispatcher)
105105
*/
106106
publicfunctionrun(InputInterface$input =null,OutputInterface$output =null)
107107
{
108-
putenv('LINES='.$this->terminal->getHeight());
109-
putenv('COLUMNS='.$this->terminal->getWidth());
108+
if ($this->terminal->getHeight()) {
109+
putenv('LINES='.$this->terminal->getHeight());
110+
}
111+
if ($this->terminal->getWidth()) {
112+
putenv('COLUMNS='.$this->terminal->getWidth());
113+
}
110114

111115
if (null ===$input) {
112116
$input =newArgvInput();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp