WordPress.org

Forums

warning media library (5 posts)

  1. omniafausta
    Member
    Posted 3 years ago #

    I just installed WordPress on a site and in the media library I get these warnings:

    Warning: explode() expects parameter 2 to be string, array given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2390

    Warning: in_array() expects parameter 2 to be array, null given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2399

    Warning: in_array() expects parameter 2 to be array, null given in /srv/avivamed/www/www.avivamedia.nl/wordpress/wp-includes/query.php on line 2399

    I don't have a clue what is wrong here, it was a clean install and it gave the problem from the start.
    I have installed WordPress before on other sites, but never had this problem.

    All help appreciated!

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Try installing the Hotfix plugin:
    http://wordpress.org/extend/plugins/hotfix/

  3. samir_attune
    Member
    Posted 3 years ago #

    might help to change in query.php following lines (in my case, 2388-2390)

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

    to this

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

  4. omniafausta
    Member
    Posted 3 years ago #

    thanks for your replies! I tried the 2nd post, and that worked! That fixed it for me.
    Probably the hotfix plugin would have fixed it as well, since their page says:
    WordPress 3.1.3
    Fix a bug that caused post_status to malfunction if passed an array
    and even with my lack of php-knowledge that seems to be about the piece of php I have changed.

    Is it a good idea to install the hotfix plugin anyway?

  5. Gouri
    Member
    Posted 3 years ago #

    I installed hotfix plugin, it's rocking!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.