Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#20011 closed defect (bug) (invalid)

Filtering posts for plugins that do not call posts to be filtered

Reported by: jroakes's profile jroakes Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: Query Keywords:
Focuses: Cc:

Description

In Query.php Line: 2745

Multisite Installation (3.3.1) While using Google XML Sitemaps Version 4.0beta4

Change:

	// Always sanitize
	foreach ( $this->posts as $i => $post ) {
		$this->posts[$i] = sanitize_post( $post, 'raw' );
		}

To:

	// Always sanitize
	if ($this->post_count > 0) {
		foreach ( $this->posts as $i => $post ) {
			$this->posts[$i] = sanitize_post( $post, 'raw' );
		}

Change History (3)

#1 @nacin
13 years ago

Was there an error here? $this->posts is always assumed to be an array. The exception would be if the query itself failed.

#2 @scribu
13 years ago

  • Keywords reporter-feedback added; needs-patch removed

#3 @wonderboymusic
12 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Crickets

Note: See TracTickets for help on using tickets.