Skip to content

Commit 324b160

Browse files
committed
trim(): Argument #1 () must be of type string, bool given
1 parent 30d5bd4 commit 324b160

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Console/Terminal.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public static function hasSttyAvailable(): bool
7777
private static function initDimensions()
7878
{
7979
if ('\\' === \DIRECTORY_SEPARATOR) {
80-
if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
80+
$ansicon = getenv('ANSICON');
81+
if (false !== $ansicon && preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim($ansicon), $matches)) {
8182
// extract [w, H] from "wxh (WxH)"
8283
// or [w, h] from "wxh"
8384
self::$width = (int) $matches[1];

0 commit comments

Comments
 (0)