Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #1309 #1311

Merged
merged 3 commits into from
May 28, 2021
Merged

Fix issue #1309 #1311

merged 3 commits into from
May 28, 2021

Conversation

mafeijam
Copy link
Contributor

this is to fix issue #1309 when executing command from the web instead of CLI

this is to solve issue spatie#1309 when executing command from the web instead of CLI
@freekmurze
Copy link
Member

Could we improve on this by only doing the defined check?

@mafeijam
Copy link
Contributor Author

just borrow the idea from Laravel Application class - runningInConsole method

maybe we can check for in_array(php_sapi_name(), ['cli', 'phpdbg']) to ensure the command is running in console instead of dong defined check.

@karticbedi
Copy link

@freekmurze any ETA when you will consider this commit ? we are waiting to push our code to production because of this error.

@freekmurze
Copy link
Member

Checking on in_array(php_sapi_name(), ['cli', 'phpdbg']) and defined('SIGINT') seems like the way to go here.

@freekmurze freekmurze merged commit cf1ab99 into spatie:master May 28, 2021
@freekmurze
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants