Optimized the error message for swoole.use_shortname. (#4350)

* Optimized the error message.

* Update CHANGELOG-2.2.md
This commit is contained in:
李铭昕 2021-12-13 16:49:35 +08:00 committed by GitHub
parent 508272ee2d
commit 2de7c16ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,10 @@
- [#4344](https://github.com/hyperf/hyperf/pull/4344) Added `Hyperf\Crontab\Event\FailToExecute` event which will be dispatched when executing crontab failed.
- [#4348](https://github.com/hyperf/hyperf/pull/4348) Support to open the generated file with your IDE automatically.
## Optimized
- [#4350](https://github.com/hyperf/hyperf/pull/4350) Optimized the error message for `swoole.use_shortname`.
# v2.2.20 - 2021-12-13
## Fixed

View File

@ -89,7 +89,7 @@ class StartServer extends Command
$useShortname = ini_get_all('swoole')['swoole.use_shortname']['local_value'];
$useShortname = strtolower(trim(str_replace('0', '', $useShortname)));
if (! in_array($useShortname, ['', 'off', 'false'], true)) {
$output->writeln("<error>ERROR</error> Swoole short function names must be disabled before the server starts, please set swoole.use_shortname = 'Off' in your php.ini.");
$output->writeln("<error>ERROR</error> Swoole short function names must be disabled before the server starts, please set swoole.use_shortname='Off' in your php.ini.");
exit(SIGTERM);
}
}