WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] dashboard and site warning after upgrading to 2.9 (6 posts)

  1. ronaldb73
    Member
    Posted 4 years ago #

    I just had WP automatically updated to 2.9 and now, both dashboard and site itself (homepage) show this warning:

    Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/creatief/domains/domainname.nl/public_html/wp-includes/rewrite.php on line 790

    What's wrong?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-related problems?

  3. ronaldb73
    Member
    Posted 4 years ago #

    switching to default or any other theme gives the same problems, with classic and default even an extra error:
    Warning: Cannot modify header information - headers already sent by (output started at /home/creatief/domains/domainname.nl/public_html/wp-includes/rewrite.php:790) in /home/creatief/domains/domainname.nl/public_html/wp-includes/pluggable.php on line 868

    i'll now try the plugins and upgrading on another site.

  4. ronaldb73
    Member
    Posted 4 years ago #

    got it. the plugin job manager makes trouble. After deactivating it, no more errors/warnings.

  5. randompage
    Member
    Posted 4 years ago #

    wp-includes/rewrite.php line 788:
    $posts = get_page_hierarchy($wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page'"));

    either "get_page_hierarchy" or "$wpdb->get_results" can be null or empty if the blog have no page at all.
    so, i think its wise if we check $posts before feed it to array_reverse.

    line 795:
    if ( !$posts )
    return array( array(), array() );

    for short solution, i think we can move line 95-96 in the ealier lines before array_reverse.

  6. rodoverdrive
    Member
    Posted 4 years ago #

    I implemented this solution and it was successful.

Topic Closed

This topic has been closed to new replies.

About this Topic