mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
In wp_ajax_ajax_tag_search()
, bail immediately if $_GET['tax']
isn't set so that all of the variable setting can happen in the same nest scope as the rest of the function - wp_die()
confuses Scrutinizer.
See #30224. Built from https://develop.svn.wordpress.org/trunk@30167 git-svn-id: http://core.svn.wordpress.org/trunk@30167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a79b6fdde3
commit
a786fb779c
@ -103,15 +103,18 @@ function wp_ajax_fetch_list() {
|
||||
* @since 3.1.0
|
||||
*/
|
||||
function wp_ajax_ajax_tag_search() {
|
||||
if ( isset( $_GET['tax'] ) ) {
|
||||
if ( ! isset( $_GET['tax'] ) ) {
|
||||
wp_die( 0 );
|
||||
}
|
||||
|
||||
$taxonomy = sanitize_key( $_GET['tax'] );
|
||||
$tax = get_taxonomy( $taxonomy );
|
||||
if ( ! $tax )
|
||||
if ( ! $tax ) {
|
||||
wp_die( 0 );
|
||||
if ( ! current_user_can( $tax->cap->assign_terms ) )
|
||||
}
|
||||
|
||||
if ( ! current_user_can( $tax->cap->assign_terms ) ) {
|
||||
wp_die( -1 );
|
||||
} else {
|
||||
wp_die( 0 );
|
||||
}
|
||||
|
||||
$s = wp_unslash( $_GET['q'] );
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-alpha-30166';
|
||||
$wp_version = '4.1-alpha-30167';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user