diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php
index 27a65ee..684ea0a 100644
--- a/wp-includes/plugin.php
+++ b/wp-includes/plugin.php
@@ -81,6 +81,9 @@ if ( ! isset( $wp_current_filter ) )
 function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
 	global $wp_filter, $merged_filters;
 
+	if( !is_int($priority) )
+		return false;
+
 	$idx = _wp_filter_build_unique_id($tag, $function_to_add, $priority);
 	$wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);
 	unset( $merged_filters[ $tag ] );
