Ticket #2785 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: debuntu Assigned to: anonymous
Priority: normal Milestone:
Component: General Version: 2.0
Severity: trivial Keywords: has-patch
Cc:

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

2785.diff (336 bytes) - added by Nazgul on 10/03/06 13:42:51.
2785_20.diff (338 bytes) - added by Nazgul on 10/03/06 13:45:23.

Change History

10/03/06 13:42:51 changed by Nazgul

  • attachment 2785.diff added.

10/03/06 13:45:23 changed by Nazgul

  • attachment 2785_20.diff added.

10/03/06 13:46:22 changed by Nazgul

  • keywords set to has-patch.
  • milestone set to 2.0.5.

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

10/03/06 15:56:26 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

11/30/06 19:41:51 changed by

  • milestone deleted.

Milestone 2.0.5 deleted