From c1a0cf30c397507995b3535b8673f5f182ec0f2f Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 8 Dec 2010 21:22:16 +0000 Subject: [PATCH] Do not store empty _wp_old_slug values. fixes #15736 git-svn-id: http://svn.automattic.com/wordpress/trunk@16820 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 41f3a9e4c0..c94437c798 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -4031,7 +4031,7 @@ function wp_check_for_changed_slugs($post_id, $post, $post_before) { $old_slugs = (array) get_post_meta($post_id, '_wp_old_slug'); // if we haven't added this old slug before, add it now - if ( !in_array($post_before->post_name, $old_slugs) ) + if ( !empty( $post_before->post_name ) && !in_array($post_before->post_name, $old_slugs) ) add_post_meta($post_id, '_wp_old_slug', $post_before->post_name); // if the new slug was used previously, delete it from the list