WordPress.org

Make WordPress Core

Ticket #30875: plugin.2.patch

File plugin.2.patch, 606 bytes (added by drrobotnik, 7 years ago)

fixed patch

  • wp-includes/plugin.php

    diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php
    index 27a65ee..2831d54 100644
    a b if ( ! isset( $wp_current_filter ) ) 
    8181function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
    8282        global $wp_filter, $merged_filters;
    8383
     84        if ( ! is_int( $priority ) ) {
     85                return false;
     86        }
     87
    8488        $idx = _wp_filter_build_unique_id($tag, $function_to_add, $priority);
    8589        $wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);
    8690        unset( $merged_filters[ $tag ] );