Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#40557 closed defect (bug) (wontfix)

Simplify wp_die calls

Reported by: presskopp's profile Presskopp Owned by:
Milestone: Priority: normal
Severity: minor Version: 4.7.4
Component: General Keywords: has-patch
Focuses: Cc:

Description

In \src\wp-admin\network\sites.php, L. 126 there's

wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) );

This can be simplified to:

wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );

Attachments (2)

40557.diff (612 bytes) - added by Presskopp 7 years ago.
40557.2.diff (1.9 KB) - added by Presskopp 7 years ago.

Download all attachments as: .zip

Change History (7)

@Presskopp
7 years ago

#1 @Presskopp
7 years ago

  • Keywords has-patch added

#2 @Presskopp
7 years ago

  • Summary changed from Simplify wp_die call in sites.php to Simplify wp_die calls

Oh, in case I am right with this, there are some more:

functions.php, L. 1225

wp_die( __( 'ERROR: This is not a valid feed template.' ), '', array( 'response' => 404 ) );

ms-load.php, L. 93, 114:

wp_die( __( 'This site is no longer available.' ), '', array( 'response' => 410 ) );

wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) );

@Presskopp
7 years ago

#3 @Presskopp
7 years ago

  • Severity changed from normal to minor

I see that we shouldn't patch things like that just because we can. Feel free to close.

#4 @johnbillion
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the patch, @Presskopp, but yes I don't think this is an essential change.

This ticket was mentioned in Slack in #core by presskopp. View the logs.


6 years ago

Note: See TracTickets for help on using tickets.