diff --git a/requirement-checker/src/Terminal.php b/requirement-checker/src/Terminal.php index 2cf1690ee..863d06a1f 100644 --- a/requirement-checker/src/Terminal.php +++ b/requirement-checker/src/Terminal.php @@ -96,7 +96,7 @@ public static function hasSttyAvailable(): bool private static function initDimensions(): void { if ('\\' === DIRECTORY_SEPARATOR) { - if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { + if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON') ?: ''), $matches)) { // extract [w, H] from "wxh (WxH)" // or [w, h] from "wxh" self::$width = (int) $matches[1];