Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#47952 new defect (bug)

create_and_get() doesn't consider that create() can return a WP_Error

Reported by: johnbillion Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


The create_and_get() methods in the test suite don't check the return value of the create() method. It can return a WP_Error, for example when attempting to create a term in a taxonomy that doesn't exist, which causes PHP errors when subsequently attempting to get the object.

Attachments (1)

47952.diff (1.4 KB) - added by johnbillion 3 weeks ago.

Download all attachments as: .zip

Change History (3)

3 weeks ago

#1 @johnbillion
3 weeks ago

  • Keywords has-patch added; needs-patch removed

#2 @johnbillion
3 weeks ago

  • Milestone changed from Awaiting Review to 5.3
Note: See TracTickets for help on using tickets.