Skip to content

Commit

Permalink
Fix "Argument symplify#1 ($string) must be of type string, bool given"
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 11, 2024
1 parent 5eb198b commit e09313c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/Terminal.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private static function initDimensions(): void
{
$consoleMode = self::getConsoleMode();

if ('\\' === \DIRECTORY_SEPARATOR) {
if ('\\' === \DIRECTORY_SEPARATOR && is_string(\getenv('ANSICON'))) {
if (\preg_match('#^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$#', \trim(\getenv('ANSICON')), $matches)) {
self::$width = (int) $matches[1];
} elseif (! self::hasVt100Support() && self::hasSttyAvailable()) {
Expand Down

0 comments on commit e09313c

Please sign in to comment.