#20867 closed defect (bug) (fixed)
Notice: Array to string conversion
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Post Types | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | justin@… |
Description
PHP Notice
Array to string conversion on \wp-includes\template.php on line 67
Attachments (2)
Change History (12)
comment:2
SergeyBiryukov — 12 months ago
- Component changed from General to Post Types
- Keywords reporter-feedback added
comment:3
arieputranto — 11 months 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.
comment:4
SergeyBiryukov — 11 months ago
- Keywords has-patch removed
Confirmed. $templates in get_archive_template() ends up being this:
Array
(
[0] => archive-Array.php
[1] => archive.php
)
comment:5
SergeyBiryukov — 11 months ago
- Keywords needs-patch added; reporter-feedback removed
- Version changed from 3.4 to 3.1
comment:7
greenshady — 9 months ago
- Cc justin@… added
comment:8
SergeyBiryukov — 9 months ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 3.5
SergeyBiryukov — 9 months ago
SergeyBiryukov — 9 months ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [21861]:
comment:10
scribu — 5 months ago
Follow-up: #22956
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.