#2308 closed defect (bug) (fixed)
Php Warnings with bbPress 2.3 and WP 3.5.1
Reported by: | nbquidditch | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.4.1 | Priority: | normal |
Severity: | normal | Version: | 2.4 |
Component: | API - Feeds | Keywords: | has-patch |
Cc: |
Description
These are the PHP Warnings that are regularly being thrown up running bbPress 2.3 running on WP 3.5.1 and the Atahualpa Theme:
Apr 15, 18:44:09 PHP Warning: Illegal offset type in /home/waterway/public_html/alrewasplan.co.uk/wp-content/plugins/bbpress/includes/common/functions.php on line 1503 Apr 15, 18:44:09 PHP Warning: Cannot modify header information - headers already sent by (output started at /home/waterway/public_html/alrewasplan.co.uk/wp-content/plugins/bbpress/includes/common/functions.php:1503) in /home/waterway/public_html/alrewasplan.co.uk/wp-content/plugins/xml-sitemap-feed/includes/feed-sitemap-news.php on line 9 Apr 16, 05:53:54 PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /home/waterway/public_html/alrewasplan.co.uk/wp-content/plugins/embedder/nbbc-1.4.5/nbbc.php on line 1106
Attachments (2)
Change History (13)
#1
@
11 years ago
- Component changed from General to Feeds
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
#2
@
11 years ago
Running into this error myself and its showing up in one of my rss feeds, making it malformed xml. I just moved to a new server, so that may have triggered it
#3
@
11 years ago
- Keywords needs-patch added
- Resolution worksforme deleted
- Status changed from closed to reopened
Found the problem:
$select_query_vars = array( 'p' => false, 'name' => false, $query_vars['post_type'] => false );
The code in line 1540 assumes that the query var 'post_type' will be a string; that is only one post type. If you have a more than one post type in that var as an array, it breaks the code and gives that error because you are trying to make an array the index.
Don't have a solution yet but that is the problem right there. Illegal offset type is the error given when you try use an array or object as the index of an array. In my case, I have a few custom post types in another plugin which can show up in the main feed so 'post_type' ends up being an array instead of string
#8
@
11 years ago
As far as I can tell, no more errors. Don't know how I can test if the code still does what its supposed to do but it fixed the bug. Thanks.
Atahualpa is a pretty strange theme, that has some incompatibilities with bbPress other than debug notices. That said, I'm not seeing the notices that you're seeing. Line 1503 in that file is pretty innocuous, only building an array from an existing value that's already checked to exist.
I'm closing this as worksforme, pending more information and duplication steps to trigger the notice.