#35034 closed defect (bug) (invalid)
Handling undefined index notices in wp_old_slug_redirect
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
Following variables $wp_query->query_vars['name']
, $wp_query->query_vars['year']
, $wp_query->query_vars['monthnum']
, and $wp_query->query_vars['day']
in the function wp_old_slug_redirect
should be checked with isset. Else undefined index notices may arise.
Change History (3)
#2
in reply to:
↑ 1
@
8 years ago
- Resolution set to invalid
- Status changed from new to closed
Replying to swissspidy:
Under what circumstances are these values not set?
Using
$wp_query->get( 'name' )
should suffice, as this function already does anisset
check.
You are correct! In my virtual pages, I faced this issue. Setting up query vars solved the issue! :p
Note: See
TracTickets for help on using
tickets.
Under what circumstances are these values not set?
Using
$wp_query->get( 'name' )
should suffice, as this function already does anisset
check.