diff --git a/Worker.php b/Worker.php index 960e2843..9bafd5f8 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 === '\\') {