Title: [UPDATE Error]wp-includes/query.php array line 2390
Last modified: August 20, 2016

---

# [UPDATE Error]wp-includes/query.php array line 2390

 *  [unrelatedmedia](https://wordpress.org/support/users/unrelatedmedia/)
 * (@unrelatedmedia)
 * [15 years ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/)
 * Since the update on my local host I recieved the following errors:
    `Warning:
   explode() expects parameter 2 to be string, array given in C:\wamp\www\wp theme\
   wp-includes\query.php on line 2390` and `Warning: in_array() expects parameter
   2 to be array, null given in C:\wamp\www\wp theme\wp-includes\query.php on line
   2399`
 * Now, I don’t know if it actually fixed anything but I edited the file to force
   an array and it seemed to remove the errors well enough. I don’t know of any 
   adverse affects to doing this yet.
 *     ```
       var_dump($q['post_status']);
       			$statuswheres = array();
       			$q_status = $q['post_status'];//explode(',', $q['post_status']);
       			$r_status = array();
       			$p_status = array();
       			$e_status = array();
       			if ( $q['post_status'] == 'any' ) {
       				foreach ( get_post_stati( array('exclude_from_search' => true) ) as $status )
       					$e_status[] = "$wpdb->posts.post_status <> '$status'";
       			} else {
       				foreach ( get_post_stati() as $status ) {
       					if ( in_array( $status, array($q_status) ) ) {//previously ## if ( in_array( $status, $q_status ) ) {
       ```
   
 * I added the dump as a check to see just what is being retrieved. For some reason
   the original update file recieved the post variable as an array, not a string
   to use explode() on. This forced the initial $q_status to recieve an error when
   attempting to build an array using the explode() because explode() expects a 
   string to break apart, not an array…which is what it was recieving.
 * As such, the $q_status array wasn’t being set. To further the oddity, the in_array()
   on line 2399 was being fed $q_status which was a string, not an the expected 
   array.
 * Can someone tell me if my temporary solution is, in fact, a solution or if I 
   should expect it to cause errors down the road?

Viewing 13 replies - 16 through 28 (of 28 total)

[←](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/?output_format=md)
[1](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/?output_format=md)
2

 *  [Ravenous Raven Design](https://wordpress.org/support/users/ravenousravendesign/)
 * (@ravenousravendesign)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098630)
 * I had the same problem too while trying to add new media. Hot fix fixed it. awesome!
 *  [chaski](https://wordpress.org/support/users/chaski/)
 * (@chaski)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098631)
 * HotFix worked for me also. Thanks so much.
 *  [pszeinert](https://wordpress.org/support/users/pszeinert/)
 * (@pszeinert)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098632)
 * I’ve had Hotfix installed on three of my sites since it was version 0.1 (now 
   0.5) and I have never had a chance to test it. Within 2 minutes of the above 
   issue being brought to my attention, I had found this thread and wondered why
   Hotfix had not worked for me.
 * …then I checked and realized it was installed but not activated. Now everything
   is as it should be.
 * Hotfix is the number one recommendation anytime someone asks what plugins I use.
   No site should run without it.
 *  [haydenhancock](https://wordpress.org/support/users/haydenhancock/)
 * (@haydenhancock)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098649)
 * The Hotfix worked for me as well.
 *  [designoahu](https://wordpress.org/support/users/designoahu/)
 * (@designoahu)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098651)
 * Hotfix didn’t work for me, but Daya’s code did. Thank you Daya!
 *  [wedhaaf](https://wordpress.org/support/users/wedhaaf/)
 * (@wedhaaf)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098652)
 * Strange.
 * I’ve update my live site to version 3.1.3. It has no problems in Media Library.
   But when I used this 3.1.3 in development stage as new installation, it does 
   show the errors.
 *  [dotwebs](https://wordpress.org/support/users/dotwebs/)
 * (@dotwebs)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098658)
 * Daya’s solutions works for me. Thanks Daya!
 * Sunnre:
 * > Could there potentionally be a problem with using Daya’s solution?
 * I shouldn’t think so but if you’re worried, back up the original query.php file
   just in case.
 *  [sperry](https://wordpress.org/support/users/sperry/)
 * (@sperry)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098665)
 * Thanks Daya! This worked for me too.
 *  [gmikeb](https://wordpress.org/support/users/gmikeb/)
 * (@gmikeb)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098668)
 * Thank you Daya! Your solution was perfect for me!
 *  Thread Starter [unrelatedmedia](https://wordpress.org/support/users/unrelatedmedia/)
 * (@unrelatedmedia)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098675)
 * currently running Hotfix on some live sites without issue. I will leave this 
   issue open for now, as there appears to be a need. It may also prove useful should
   anyone encounter any issues with any of the fixes listed.
 * If anyone is keeping an eye on the WordPress trunk and sees this fixed for the
   next update please post here to let the community know!
 *  [Omegakenshin](https://wordpress.org/support/users/omegakenshin/)
 * (@omegakenshin)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098678)
 * Daya! Thanks a lot!!
    *hugs* really need this ^^
 *  [Alex Israel](https://wordpress.org/support/users/alex-israel/)
 * (@alex-israel)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098679)
 * Daya!
    xcellent post, worked like a charm 🙂
 *  [Andrew Nacin](https://wordpress.org/support/users/nacin/)
 * (@nacin)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098681)
 * I’m going to close this thread.
 * The Hotfix plugin should solve all issues: [http://wordpress.org/extend/plugins/hotfix/](http://wordpress.org/extend/plugins/hotfix/)
 * If it doesn’t, then I wouldn’t be surprised if you have something else going 
   on and you should open a new thread.
 * Cheers.

Viewing 13 replies - 16 through 28 (of 28 total)

[←](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/?output_format=md)
[1](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/?output_format=md)
2

The topic ‘[UPDATE Error]wp-includes/query.php array line 2390’ is closed to new
replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 28 replies
 * 26 participants
 * Last reply from: [Andrew Nacin](https://wordpress.org/support/users/nacin/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/update-errorwp-includesqueryphp-array-line-2390/page/2/#post-2098681)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
