mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 21:54:28 +00:00
Permalinks: Avoid a PHP notice in wp_resolve_numeric_slug_conflicts() when visiting a day archive with the /%postname%/ permalink structure.
Props thakkarhardik, thomstark. Fixes #46828. git-svn-id: https://develop.svn.wordpress.org/trunk@45214 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -376,9 +376,9 @@ function wp_resolve_numeric_slug_conflicts( $query_vars = array() ) {
|
||||
$compare = '';
|
||||
if ( 0 === $postname_index && ( isset( $query_vars['year'] ) || isset( $query_vars['monthnum'] ) ) ) {
|
||||
$compare = 'year';
|
||||
} elseif ( '%year%' === $permastructs[ $postname_index - 1 ] && ( isset( $query_vars['monthnum'] ) || isset( $query_vars['day'] ) ) ) {
|
||||
} elseif ( $postname_index && '%year%' === $permastructs[ $postname_index - 1 ] && ( isset( $query_vars['monthnum'] ) || isset( $query_vars['day'] ) ) ) {
|
||||
$compare = 'monthnum';
|
||||
} elseif ( '%monthnum%' === $permastructs[ $postname_index - 1 ] && isset( $query_vars['day'] ) ) {
|
||||
} elseif ( $postname_index && '%monthnum%' === $permastructs[ $postname_index - 1 ] && isset( $query_vars['day'] ) ) {
|
||||
$compare = 'day';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user