[wp-trac] [WordPress Trac] #63635: Tests: rest-posts-controller hooks blow under certain circumstances
WordPress Trac
noreply at wordpress.org
Mon Jun 30 13:03:53 UTC 2025
#63635: Tests: rest-posts-controller hooks blow under certain circumstances
-------------------------------------------------+-------------------------
Reporter: SirLouen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: REST API | Version: 4.8
Severity: blocker | Resolution:
Keywords: has-patch has-unit-tests dev- | Focuses: tests
feedback |
-------------------------------------------------+-------------------------
Comment (by SirLouen):
After some debugging I found and sorted the problem
For some reason, some tests need to `array_push` their empty array to
`$this->post_clauses;` otherwise they will fail. I did not consider that
`wpSetUpBeforeRequest` was setting an empty array that was not passing
this. So in this case, instead of checking for not empty, I shall be
checking just for `isset` so they can add their empty array, this way, now
this is fully working.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63635#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list