diff --git a/Worker.php b/Worker.php index 960e2843a..9bafd5f82 100644 --- a/Worker.php +++ b/Worker.php @@ -569,8 +569,8 @@ public static function runAll() */ protected static function checkSapiEnv() { - // Only for cli. - if (\PHP_SAPI !== 'cli') { + // Only for cli and micro. + if (!in_array(\PHP_SAPI, ['cli', 'micro'])) { exit("Only run in command line mode \n"); } if (\DIRECTORY_SEPARATOR === '\\') {