We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30d5bd4 commit 324b160Copy full SHA for 324b160
src/Symfony/Component/Console/Terminal.php
@@ -77,7 +77,8 @@ public static function hasSttyAvailable(): bool
77
private static function initDimensions()
78
{
79
if ('\\' === \DIRECTORY_SEPARATOR) {
80
- if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
+ $ansicon = getenv('ANSICON');
81
+ if (false !== $ansicon && preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim($ansicon), $matches)) {
82
// extract [w, H] from "wxh (WxH)"
83
// or [w, h] from "wxh"
84
self::$width = (int) $matches[1];
0 commit comments