Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#2785 closed defect (bug) (fixed)

wp-includes/classes.php loop not incrementing $tok_index

Reported by: debuntu Owned by:
Priority: normal Milestone:
Component: General Version: 2.0
Severity: trivial Keywords: has-patch
Cc: Focuses:

Description

It seems that something is missing in wp-includes/classes.php . At line 1022:

$tok_index = 1;

foreach ($tokens[0] as $token) {

if ( ($token == '%post_id%') && ($tok_index <= 3) ) {

$front = $front . 'date/';
break;

}

}

$tok_index is never increased?!? This force writing "date/" in front of archives pages.
there should be $tok_index++ after the if(){} condition.
Check this thread:
http://wordpress.org/support/topic/67914

Attachments (2)

2785.diff (336 bytes ) - added by Nazgul 20 years ago.
2785_20.diff (338 bytes ) - added by Nazgul 20 years ago.

Download all attachments as: .zip

Change History (5)

@Nazgul
20 years ago

@Nazgul
20 years ago

#1 @Nazgul
20 years ago

  • Keywords has-patch added
  • Milestone2.0.5

Pacthes for 2.0 and trunk attached which implement the fix mentioned in the ticket.

#2 @ryan
20 years ago

  • Resolutionfixed
  • Status newclosed

(In [4279]) Increment tok_index. fixes #2785

#3 @(none)
20 years ago

  • Milestone 2.0.5

Milestone 2.0.5 deleted

Note: See TracTickets for help on using tickets.