[wp-trac] [WordPress Trac] #63622: Warning on inline-save AJAX
WordPress Trac
noreply at wordpress.org
Thu Jun 26 12:42:33 UTC 2025
#63622: Warning on inline-save AJAX
--------------------------+-----------------------------
Reporter: bor0 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Our servers reported the following warning:
{{{
Undefined array key "_status"
}}}
After digging deeper, I found that we're assuming this is always going to
be set here: https://github.com/WordPress/WordPress/blob/d4d9284/wp-
admin/includes/ajax-actions.php#L2118
To reproduce, you can either use `curl` and populate all the necessary
information (auth token, nonce, etc.), but I found an easier way:
{{{
$ wp shell
wp> wp_set_current_user( 1 )
wp> require_once ABSPATH . 'wp-admin/includes/ajax-actions.php';
wp> $_POST = []; // Note: We will intentionally omit '_status' to trigger
the warning
wp> $_POST['action'] = 'inline-save'
wp> $_POST['post_ID'] = current( get_posts() )->ID
wp> $_POST['post_type'] = 'post'
wp> $_POST['_inline_edit'] = wp_create_nonce( 'inlineeditnonce' )
wp> $_POST['screen'] = 'edit-post'
wp> $_POST['post_view'] = 'list'
wp> $_REQUEST = $_POST // need this for referer check function
wp> wp_ajax_inline_save();
PHP Warning: Undefined array key "_status" in /opt/homebrew/var/www/wp-
admin/includes/ajax-actions.php on line 2118
Warning: Undefined array key "_status" in /opt/homebrew/var/www/wp-
admin/includes/ajax-actions.php on line 2118
...
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63622>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list