cast to array when checking for old post slugs. fixes #3202
git-svn-id: https://develop.svn.wordpress.org/trunk@4571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
77e4790a50
commit
41696e78d5
@ -2084,7 +2084,7 @@ function wp_check_for_changed_slugs($post_id) {
|
|||||||
if ( $post->post_name == $_POST['wp-old-slug'] )
|
if ( $post->post_name == $_POST['wp-old-slug'] )
|
||||||
return $post_id;
|
return $post_id;
|
||||||
|
|
||||||
$old_slugs = get_post_meta($post_id, '_wp_old_slug');
|
$old_slugs = (array) get_post_meta($post_id, '_wp_old_slug');
|
||||||
|
|
||||||
// if we haven't added this old slug before, add it now
|
// if we haven't added this old slug before, add it now
|
||||||
if ( !count($old_slugs) || !in_array($_POST['wp-old-slug'], $old_slugs) )
|
if ( !count($old_slugs) || !in_array($_POST['wp-old-slug'], $old_slugs) )
|
||||||
|
Loading…
Reference in New Issue
Block a user