Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#46460 closed defect (bug) (fixed)

wp_die_handler() in the test suite should accept a WP_Error object

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

Description

The default handlers for calls to wp_die() accept a WP_Error object in the $message parameter. The handler in the test suite does not.

Core passes a WP_Error object to wp_die() in a few places, for example in wp-includes/template-loader.php if there's a problem with the theme. Currently, this error object gets converted to a string in the test suite, resulting in a test failure message that states WPDieException: 0.

Attachments (1)

46460.patch (525 bytes) - added by johnbillion 6 years ago.

Download all attachments as: .zip

Change History (5)

@johnbillion
6 years ago

#1 @johnbillion
6 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 5.2

#2 @johnbillion
6 years ago

  • Milestone changed from 5.2 to 5.1.2

#3 @johnbillion
6 years ago

  • Milestone changed from 5.1.2 to 5.2

#4 @johnbillion
6 years ago

  • Owner set to johnbillion
  • Resolution set to fixed
  • Status changed from new to closed

In 44944:

Build/Test tools: Add support for passing a WP_Error object to wp_die() during tests.

This brings the functionality inline with wp_die() during non-test usage.

Fixes #46460

Note: See TracTickets for help on using tickets.