Browse Source

Merge pull request #481 from joanhey/sapi

Use PHP_SAPI constant instead of function
walkor 6 năm trước cách đây
mục cha
commit
ad32b7aa82
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Worker.php

+ 1 - 1
Worker.php

@@ -542,7 +542,7 @@ class Worker
     protected static function checkSapiEnv()
     {
         // Only for cli.
-        if (\php_sapi_name() !== 'cli') {
+        if (PHP_SAPI !== 'cli') {
             exit("only run in command line mode \n");
         }
         if (DIRECTORY_SEPARATOR === '\\') {