PHP Bug Fixed.

This commit is contained in:
Varun 2020-10-21 10:29:06 +05:30
parent 9049bceb4e
commit 93bb3790ac
No known key found for this signature in database
GPG key ID: 93FB46DCF16E0D6F

View file

@ -53,7 +53,7 @@ class GH_LOG {
'hidden' => '8',
);
public static $eof = '\n';
static $eof = "\n";
/**
* Logs a string to console.
@ -95,7 +95,7 @@ class GH_LOG {
$colored_string = '';
if ( isset( self::$foreground_colors[ $foreground_color ] ) ) {
$colored_string .= '\033[' . self::$foreground_colors[ $foreground_color ] . 'm';
$colored_string .= "\033[" . self::$foreground_colors[ $foreground_color ] . 'm';
} else {
die( $foreground_color . ' not a valid color' );
}
@ -104,13 +104,13 @@ class GH_LOG {
foreach ( $args as $option ) {
if ( isset( self::$background_colors[ $option ] ) ) {
$colored_string .= '\033[' . self::$background_colors[ $option ] . 'm';
$colored_string .= "\033[" . self::$background_colors[ $option ] . 'm';
} elseif ( isset( self::$options[ $option ] ) ) {
$colored_string .= '\033[' . self::$options[ $option ] . 'm';
$colored_string .= "\033[" . self::$options[ $option ] . 'm';
}
}
$colored_string .= $string . '\033[0m';
$colored_string .= $string . "\033[0m";
return $colored_string;
}
}