[wp-trac] [WordPress Trac] #52252: PHP Notice when `monthnum` query var is set without the `year` QV
WordPress Trac
noreply at wordpress.org
Mon Aug 8 14:38:23 UTC 2022
#52252: PHP Notice when `monthnum` query var is set without the `year` QV
-------------------------------------------------+-------------------------
Reporter: dd32 | Owner:
| peterwilsoncc
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.1
Component: Rewrite Rules | Version: 4.3
Severity: normal | Resolution: fixed
Keywords: has-patch early needs-unit-tests | Focuses:
commit |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
In [changeset:"53861" 53861]:
{{{
#!CommitTicketReference repository="" revision="53861"
Tests: Improve the test for not throwing a warning on malformed date
queries.
* Make it specifically about `wp_resolve_numeric_slug_conflicts()`, the
function that was throwing an `Undefined array key "year"` PHP warning for
malformed date requests.
* Move the test under the `rewrite` component and make its name a bit more
descriptive.
* Check the return result of the function instead of performing a dummy
assertion.
* Use named array keys in the data provider for clarity.
* Add missing `@covers` tag.
Follow-up to [32648], [53857].
Props costdev, peterwilsoncc, 1naveengiri, mukesh27, SergeyBiryukov.
See #52252, #45513.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52252#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list