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

[BUG] : prevent "Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, null given" #47

Conversation

Fahl-Design
Copy link
Contributor

Bug

When a request was made but Content-Type header was set,
and an other normal exception is thrown

normal exception is not displayed because:

Trace

Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, null given in /var/www/html/vendor/codeception/lib-innerbrowser/src/Codeception/Lib/InnerBrowser.php:101
Stack trace:
#0 /var/www/html/vendor/codeception/lib-innerbrowser/src/Codeception/Lib/InnerBrowser.php(101): explode(';', NULL)
#1 /var/www/html/vendor/codeception/codeception/src/Codeception/Subscriber/Module.php(77): Codeception\Lib\InnerBrowser->_failed(Object(Codeception\Test\Cest), Object(PHPUnit\Framework\ExceptionWrapper))

- always use casting to string to hit more cases

Co-authored-by: Gustavo Nieves <64917965+TavoNiievez@users.noreply.github.com>
@TavoNiievez TavoNiievez merged commit 879872d into Codeception:master Dec 21, 2021
@Fahl-Design Fahl-Design deleted the fix_handling_for_missing_content_type_header branch December 21, 2021 10:49
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.

None yet

2 participants