-
Notifications
You must be signed in to change notification settings - Fork 117
Fix: Handle null request in CakePHP Server::run hook #385
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: Handle null request in CakePHP Server::run hook #385
Conversation
|
Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one. |
|
|
929cd78 to
89cc6be
Compare
89cc6be to
c648903
Compare
|
Appolgies for the noise. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #385 +/- ##
============================================
+ Coverage 81.33% 82.14% +0.81%
- Complexity 1308 1801 +493
============================================
Files 116 137 +21
Lines 5630 7594 +1964
============================================
+ Hits 4579 6238 +1659
- Misses 1051 1356 +305 Flags with carried forward coverage won't be shown. Click here to find out more.
... and 21 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Issue
On CakePHP
5.2.4, I get the following error:Solution
This PR introduces a null check for
$params[0]before attempting to cast it to aServerRequestInterface. If$params[0]is null, the$requestvariable is set to null, preventing the error and allowing the instrumentation to continue gracefully (albeit without request-specific attributes).