0

I am getting errors like

Warning: explode() expects parameter 2 to be string, array given in /data/www/ae/wp-includes/query.php on line 2390
Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399
Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399
Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399
Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399
Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399
Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399
Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399
Warning: in_array() expects parameter 2 to be array, null given in /data/www/ae/wp-includes/query.php on line 2399

Whats wrong?

1
  • Have your tried disabling all plugins and switching to default theme? Do the errors still appear? If you do that we can narrow down what is causing the errors
    – Scott
    Jun 17, 2011 at 10:09

5 Answers 5

1

Installing the hotfix plugin may help to solve the problem. http://wordpress.org/extend/plugins/hotfix/

Currently I am using wordpress3.1.3 and got same type errors while browsing the media(media list page) in admin panel and hotfix plugin solves that.

2

You're not alone. It's a problem with a variable type assumption in WP_Query. I fixed it by editing line 2390 in wp-includes/query.php from this;

$q_status = explode(',', $q['post_status']);

To this:

$q_status = is_array( $q['post_status'] ) ? $q['post_status'] : explode(',', $q['post_status']);

I was going to submit to trac, but I've just checked the trunk and it looks like it's already been fixed. Hopefully it'll make the next release :)

0

I was experiencing this problem after upgrading to 3.1.3, too. The manual fix you described didn't work for me. I might have overlooked something but couldn't find it if I did.

As suggested by some other users, I installed the Wordpress Hotfix plugin and it corrected the problem...

Michael

0

First of all open query.php file into wp-includes folder. find this code..

if ( isset($q['post_status']) && $q['post_status'] != '' ) { $statuswheres = array(); $q_status = explode(',', $q['post_status']);

and Replace with :--

if ( ! empty( $q['post_status'] ) ) { $statuswheres = array(); $q_status = $q['post_status']; if ( ! is_array( $q_status ) ) $q_status = explode(',', $q_status);

0

install http://wordpress.org/extend/plugins/hotfix/ and it'll fix it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.