#17556 closed defect (bug) (fixed)
PHP Errors on the media page in 3.1.3
| Reported by: | philipwalton | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.4 |
| Component: | Query | Version: | |
| Severity: | major | Keywords: | |
| Cc: | Focuses: |
Description
I just upgraded to WordPress 3.1.3 and I'm seeing the following PHP errors with debug turned on when I click on the media page:
Warning: explode() expects parameter 2 to be string, array given in /Users/pwalton/Sites/philipwalton/wp-includes/query.php on line 2390
Warning: in_array() expects parameter 2 to be array, null given in /Users/pwalton/Sites/philipwalton/wp-includes/query.php on line 2399
I'll see if I can create a patch for them unless someone else is already working on it.
Attachments (1)
Change History (13)
#2
@
15 years ago
No, I just clicked on the "Media" link in the sidebar. That's where the errors showed up. This is a fresh install with no plugins activated and only the data I just imported via the WordPress importer.
It may not be 3.1.3, but I just noticed it after upgrading.
#3
@
15 years ago
I just tried with another site I administer. No problems in 3.1.2, but as soon as I upgraded to 3.1.3, I noticed those errors on the media page.
#5
@
15 years ago
- Keywords needs-patch removed
- Milestone Awaiting Review → 3.1.4
- Severity normal → blocker
We done goofed.
#7
@
15 years ago
- Severity blocker → major
Given that this did not actually break the query, I'm lowering this to major. It changes the SQL but not functionally. The only bug is an E_WARNING.
#8
@
15 years ago
For the record, the 3.1.2 query:
SELECT SQL_CALC_FOUND_ROWS wp31clean_posts.* FROM wp31clean_posts WHERE 1=1 AND wp31clean_posts.post_type = 'attachment' AND (wp31clean_posts.post_status = 'inherit') ORDER BY wp31clean_posts.post_date DESC LIMIT 0, 20
The 3.1.3 query:
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'attachment' ORDER BY wp_posts.post_date DESC LIMIT 0, 20
The 3.1.4 query:
SELECT SQL_CALC_FOUND_ROWS wp31clean_posts.* FROM wp31clean_posts WHERE 1=1 AND wp31clean_posts.post_type = 'attachment' AND (wp31clean_posts.post_status = 'inherit' OR wp31clean_posts.post_status = 'private') ORDER BY wp31clean_posts.post_date DESC LIMIT 0, 20
They're all equivalent except for the private posts check now in 3.1.4, which is expected.
#9
@
15 years ago
See #17559. Also, this bug is fixed in the Hotfix plugin: http://wordpress.org/extend/plugins/hotfix/.
#12
@
15 years ago
+1 Glad this is getting fixed.
Surfed in from http://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Don't think is 3.1.3. Are you using WP_Query/query_posts with post_status as an array? That doesn't work (despite what the Codex once said) until 3.2. Needs to be comma-separated.