From cce1586c75d1c716234678a5c8c343e6d5d791bc Mon Sep 17 00:00:00 2001 From: ThemeBoy Date: Sun, 1 Dec 2013 17:43:39 +1100 Subject: [PATCH] Fix bug to sanitize variable type post slugs --- sportspress-filters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sportspress-filters.php b/sportspress-filters.php index 1da65364..6ca3af13 100644 --- a/sportspress-filters.php +++ b/sportspress-filters.php @@ -45,7 +45,7 @@ add_filter('the_content', 'sportspress_the_content'); function sp_sanitize_title( $title ) { - if ( isset( $_POST ) && in_array( 'post_type', $_POST ) && in_array( $_POST['post_type'], array( 'sp_result', 'sp_outcome', 'sp_stat', 'sp_metric' ) ) ): + if ( isset( $_POST ) && array_key_exists( 'post_type', $_POST ) && in_array( $_POST['post_type'], array( 'sp_result', 'sp_outcome', 'sp_stat', 'sp_metric' ) ) ): // Get post title $title = $_POST['post_title'];