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 #350: Do not setcookie during unit tests #351

Merged

Conversation

djarran
Copy link
Contributor

@djarran djarran commented Nov 22, 2024

Description: This resolves issue #350. These errors were occurring because we executing setcookie. This does not need to be done when running unit tests.

Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to the browser

https://www.php.net/manual/en/features.cookies.php

@djarran djarran self-assigned this Nov 22, 2024
@djarran djarran changed the title Fix #350: Use correct check for PHPUNIT_TEST Fix #350: Do not setcookie during unit tests Nov 25, 2024
@djarran djarran force-pushed the issue-350-MOODLE_39_STABLE-test-errors branch from 4ba3205 to 68959e3 Compare November 25, 2024 05:43
@brendanheywood brendanheywood merged commit 7f55f5d into MOODLE_39_STABLE Nov 27, 2024
34 checks passed
@brendanheywood brendanheywood deleted the issue-350-MOODLE_39_STABLE-test-errors branch November 27, 2024 20:32
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.

2 participants