mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Correct an SQL syntax error introduced in r30158. Adds tests.
Fixes #30339 See #18962 Props julien731 git-svn-id: https://develop.svn.wordpress.org/trunk@30480 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3720,7 +3720,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
|
||||
$suffix = 2;
|
||||
do {
|
||||
$alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
|
||||
$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_ID, $post_parent ) );
|
||||
$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_type, $post_ID, $post_parent ) );
|
||||
$suffix++;
|
||||
} while ( $post_name_check );
|
||||
$slug = $alt_post_name;
|
||||
|
||||
Reference in New Issue
Block a user