Opened 5 years ago
Closed 5 years ago
#7483 closed defect (bug) (fixed)
redirect_canonical not send type_of_url to user_trailingslashit
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 2.6.1 |
| Component: | General | Version: | 2.7 |
| Severity: | minor | Keywords: | has-patch canonical url redirect |
| Cc: |
Description
the function redirect_canonical not send correct type_of_url to user_trailingslashit when path is not home.
an accolade missing and it's in accordance with the indentation.
canonical.php :
***************
*** 165,175 ****
} else {
foreach ( array('single', 'category', 'page', 'day', 'month', 'year') as $type ) {
$func = 'is_' . $type;
! if ( call_user_func($func) )
$user_ts_type = $type;
break;
}
}
$redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type);
} elseif ( is_home() ) {
$redirect['path'] = trailingslashit($redirect['path']);
--- 165,176 ----
} else {
foreach ( array('single', 'category', 'page', 'day', 'month', 'year') as $type ) {
$func = 'is_' . $type;
! if ( call_user_func($func) ) {
$user_ts_type = $type;
break;
}
}
+ }
$redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type);
} elseif ( is_home() ) {
$redirect['path'] = trailingslashit($redirect['path']);
Attachments (1)
Change History (6)
comment:3
markjaquith — 5 years ago
- Resolution set to fixed
- Status changed from new to closed
comment:4
markjaquith — 5 years ago
- Milestone changed from 2.7 to 2.6.1
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for 2.6.1
comment:5
markjaquith — 5 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Note: See
TracTickets for help on using
tickets.

Reporters code in .diff format.