#20867 closed defect (bug) (fixed)
Notice: Array to string conversion
Reported by: | arieputranto | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | Cc: |
Description
PHP Notice
Array to string conversion on \wp-includes\template.php on line 67
Attachments (2)
Change History (12)
#3
@
12 years ago
- Keywords has-patch added
It happened when the post_format archive is being loaded e.g.: http://localhost/type/media
I fixed mine by adding a line on line: 65 of wp-includes/template.php:
$post_type = $post_type[0];
$wp_query->query['post_format']
and $wp_query->query_vars['post_format']
are indeed an array.
#4
@
12 years ago
- Keywords has-patch removed
Confirmed. $templates
in get_archive_template()
ends up being this:
Array ( [0] => archive-Array.php [1] => archive.php )
#8
@
12 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 3.5
Note: See
TracTickets for help on using
tickets.
Could you give the query that's producing this? Quick testing with a multi-post type query and I can't get the archive template to be loaded.
Also, it's likely this can be triggered since 3.1.