diff --git a/force/redirect.php b/force/redirect.php index 8a237dd..32f430a 100644 --- a/force/redirect.php +++ b/force/redirect.php @@ -20,6 +20,10 @@ final class Redirect extends Helpers\Singleton { * Initialize the redirection process */ protected function onConstruct() { + if (php_sapi_name() == "cli") { + // do nothing when we are in CLI mode + return; + } add_action('init', [$this, 'init'], PHP_INT_MAX); } @@ -90,4 +94,4 @@ private function removeHeaders() { -} \ No newline at end of file +}