mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-06 14:19:23 +08:00
Simplified regular expressions
This commit is contained in:
@ -613,7 +613,7 @@ class BaseConsole
|
||||
$output = [];
|
||||
exec('mode con', $output);
|
||||
if (isset($output, $output[1]) && strpos($output[1], 'CON') !== false) {
|
||||
return $size = [(int) preg_replace('~[^0-9]~', '', $output[3]), (int) preg_replace('~[^0-9]~', '', $output[4])];
|
||||
return $size = [(int) preg_replace('~\D~', '', $output[3]), (int) preg_replace('~\D~', '', $output[4])];
|
||||
}
|
||||
} else {
|
||||
// try stty if available
|
||||
|
Reference in New Issue
Block a user