Skip to content

Commit 37e6cca

Browse files
committed
Don't pass null to preg_replace()
Signed-off-by: Alexander M. Turek <[email protected]>
1 parent 77c4d55 commit 37e6cca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Helper/Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public static function removeDecoration(OutputFormatterInterface $formatter, ?st
170170
// remove <...> formatting
171171
$string = $formatter->format($string ?? '');
172172
// remove already formatted characters
173-
$string = preg_replace("/\033\[[^m]*m/", '', $string);
173+
$string = preg_replace("/\033\[[^m]*m/", '', $string ?? '');
174174
$formatter->setDecorated($isDecorated);
175175

176176
return $string;

0 commit comments

Comments
 (0)