Opened 14 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: |
|
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)
Note: See
TracTickets for help on using
tickets.
Was there an error here? $this->posts is always assumed to be an array. The exception would be if the query itself failed.