File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/Symfony/Component/Console/Output Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -153,14 +153,18 @@ private function openOutputStream()
153
153
return fopen ('php://output ' , 'w ' );
154
154
}
155
155
156
- return @fopen ('php://stdout ' , 'w ' ) ?: fopen ('php://output ' , 'w ' );
156
+ return \defined ( ' STDOUT ' ) ? \ STDOUT : ( @fopen ('php://stdout ' , 'w ' ) ?: fopen ('php://output ' , 'w ' ) );
157
157
}
158
158
159
159
/**
160
160
* @return resource
161
161
*/
162
162
private function openErrorStream ()
163
163
{
164
- return fopen ($ this ->hasStderrSupport () ? 'php://stderr ' : 'php://output ' , 'w ' );
164
+ if (!$ this ->hasStderrSupport ()) {
165
+ return fopen ('php://output ' , 'w ' );
166
+ }
167
+
168
+ return \defined ('STDERR ' ) ? \STDERR : (@fopen ('php://stderr ' , 'w ' ) ?: fopen ('php://output ' , 'w ' ));
165
169
}
166
170
}
You can’t perform that action at this time.
0 commit comments