#3719 closed defect (bug) (fixed)
Request helpers warn when REQUEST_METHOD is unavailable
| Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6.20 |
| Component: | API | Version: | 2.3 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: |
Description
bbp_is_post_request() and bbp_is_get_request() unconditionally read $_SERVER['REQUEST_METHOD']. In CLI and other non-HTTP contexts where that key is unavailable, both helpers emit an undefined-key warning instead of satisfying their boolean contract.
Guard the server value before normalizing it, returning false when no request method exists. Regression coverage should include missing, case-insensitive, and unrelated request methods.
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 7874: