Skip to content

Commit d48dc2a

Browse files
authored
Additional check for $argv variable when detecting CLI
1 parent be99e5e commit d48dc2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/Common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ function is_cli(): bool
763763
return true;
764764
}
765765

766-
if (! isset($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']))
766+
if (! isset($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']) && isset($_SERVER['argv']) && count($_SERVER['argv']) > 0)
767767
{
768768
return true;
769769
}

0 commit comments

Comments
 (0)