Opened 16 months ago

Last modified 16 months ago

#20011 new defect (bug)

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

Reported by: jroakes Owned by:
Priority: normal Milestone: Awaiting Review
Component: Query Version: 3.3.1
Severity: normal Keywords: reporter-feedback
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 (2)

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

  • Keywords reporter-feedback added; needs-patch removed
Note: See TracTickets for help on using tickets.