Support » Fixing WordPress » Error message when i click on media in admin

  • Resolved gavpedz

    (@gavpedz)


    i get this error in the header when clicking on media in admin only seems to happen in media

    Warning: explode() expects parameter 2 to be string, array given in /mypath/public_html/wp-includes/query.php on line 2390

    Warning: in_array() expects parameter 2 to be array, null given in /mypath/public_html/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /mypath/public_html/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /mypath/public_html/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /mypath/public_html/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /mypath/public_html/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /mypath/public_html/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /mypath/public_html/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /mypath/public_html/wp-includes/query.php on line 2399

Viewing 15 replies - 1 through 15 (of 31 total)
  • I just began getting this error too. Doesn’t seem to be anywhere else. Also, I installed an update last night. I’m wondering if something in the update is causing this. I believe it was 3.1.3.

    Tried to reinstall just to see if that fixed it, no dice.

    The line numbers in question reference an IF statement in query.php regarding post_status

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

    A real ugly nuisance, but nothing seems to be effected other than my media pages. And those still allow me to upload new media just fine, add media to posts, etc.

    Odd. Too early to diagnose more. Need coffee.

    Okay, I lied — coffee is waiting a bit more.

    The following is a portion from the 3.1.3 release notes:

    Media security fixes by Richard Lundeen of Microsoft, Jesse Ou of Microsoft, and Microsoft Vulnerability Research.
    Improves file upload security on hosts with dangerous security settings.

    Amusing comments about Microsoft possibly breaking (or just making ugly) my WordPress install (I kid! Good contributors!), it looks like the media security fixes did something odd. Either that or my file upload security is throwing up some errors! Do I need to harden, or was there an error in the Media security fix?

    I updated to 3.1.3 also seems like it might be something to do with this hope there is a fix soon.

    I’m confident there will be something. After all, a lot of poor schmucks like use who update to 3.1.3 should soon start getting the same error and come here to find out what’s going on.

    Same problem here. Hopefully a fix will come soon as I’m currently unable to access the Media section.

    same error- i just updated! it is in the media section. hopefully the fix will be revealed in this thread when it happens??

    Here’s the change from WordPress trac that fixes it.

    http://core.trac.wordpress.org/changeset/18047

    It looks like we’ll have to wait till 3.1.4 for it to be an official fix, but, if you want to fix it now, you can just make the changes yourself to the file and everything should be working. It worked for me.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    Alternately, install http://wordpress.org/extend/plugins/hotfix/ and it’ll fix it.

    This is a weird bug that hit a VERY small group of people, and the devs know. The mods are reporting it up the chain 😉

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    I believe this glitch can also be fixed by applying the Hotfix plug-in:

    http://wordpress.org/extend/plugins/hotfix/

    Let me know if it works.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Whoops – Ipstenu beat me to it. 😉

    Yep… I can confirm that applying the “hotfix” Plug-in solves the problem. Media Library is working again.

    Thanks all!

    Thanks Ipstenu and zooni for the hotfix worked for me as well, at first I thought it was a corrupt database.

    yep same here. The modified query.php file works fine.

    Thanks to Big Brother ^^

    In English :
    You can correct this error 😉 Edit the file query.php on directory wp-includes of WordPress :
    replace :

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

    by it :

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

    In French / en Français :
    Vous pouvez corriger cette erreur 😉 Editez le fichier query.php dans le dossier wp-includes de WordPress :
    remplacez :

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

    par ça :

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

    Enjoy xD

    So good to have you guys! I modified query.php file, works perfect. But before that I made loud “WTF”.

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘Error message when i click on media in admin’ is closed to new replies.