WordPress.org

Make WordPress Core

Opened 8 months ago

Last modified 4 months ago

#46418 new enhancement

Use wp_die() instead of die() function in wordpress

Reported by: immeet94 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-testing
Focuses: Cc:
PR Number:

Description

When use the wp_json_encode() function that time you should use wp_die function instead of die() function.
Because wp_die() function do Kill WordPress execution and display HTML message with error message.

Attachments (2)

#46418.diff (461 bytes) - added by immeet94 8 months ago.
Please see this file for patch
46418.2.diff (1.3 KB) - added by garrett-eclipse 4 months ago.
Updated all instances of die to wp_die in class-wp-list-table.php

Download all attachments as: .zip

Change History (6)

@immeet94
8 months ago

Please see this file for patch

#1 @immeet94
7 months ago

  • Severity changed from normal to major

#2 @immeet94
7 months ago

  • Severity changed from major to normal
  • Version trunk deleted

#3 @desrosj
4 months ago

  • Component changed from General to Administration
  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to Future Release

Hi @immeet94,

Welcome to Trac!

Thanks for this ticket. It seems that there are several more occurrences of die() in WP_List_Table. Are you able to look into fixing those as well?

@garrett-eclipse
4 months ago

Updated all instances of die to wp_die in class-wp-list-table.php

#4 @garrett-eclipse
4 months ago

  • Keywords needs-testing added; needs-refresh removed

In 46418.2.diff I've replaced all instances of die with wp_die in class-wp-list-table.php

Note: See TracTickets for help on using tickets.