Skip to content

Commit

Permalink
Merge pull request #1755 from jf-viguier/patch-21
Browse files Browse the repository at this point in the history
Better cli detection
  • Loading branch information
nicosomb committed Nov 26, 2023
2 parents 69bf6a6 + 2476459 commit 3f0b770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/concepts/controllers/front-controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class ExampleModuleCronModuleFrontController extends ModuleFrontController
{
$this->ajax = 1;

if (php_sapi_name() !== 'cli') {
if (!Tools::isPHPCLI()) {
$this->ajaxRender('Forbidden call.');
}

Expand Down

0 comments on commit 3f0b770

Please sign in to comment.