Opened 15 years ago
Closed 13 years ago
#20011 closed defect (bug) (invalid)
Filtering posts for plugins that do not call posts to be filtered
| Reported by: | jroakes | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Query | Version: | 3.3.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Was there an error here? $this->posts is always assumed to be an array. The exception would be if the query itself failed.