Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion force/redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -90,4 +94,4 @@ private function removeHeaders() {



}
}