WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error in 2.5 Dashboard (5 posts)

  1. jodiwilldare
    Member
    Posted 6 years ago #

    Hello. I updated to WordPress 2.5 tonight and now on my dashboard page I get this error:
    Fatal error: Unsupported operand types in /web/script/jodic/paulwesterberg.net/wordpress/wp-admin/index.php(101) : runtime-created function on line 1

    [It appears under the You have XX posts line]

    I've tried deactivating all the plug-ins, using different themes, and I still get the error.

    I installed 2.5 (from the same download) on a different site on the same server and I don't have a problem on that dashboard.

    Any help, please?

  2. kath
    Member
    Posted 6 years ago #

    I'm having the same problem.

    this is line 101 of index.php:

    $num_widgets = array_reduce( $sidebars_widgets, create_function( '$prev, $curr', 'return $prev+count($curr);' ) );

    I don't know PHP very well at all, but could this have something to do with it?
    http://www.issociate.de/board/post/211580/Unsupported_operand_types.html

  3. renders
    Member
    Posted 6 years ago #

    I'm also getting this in the dashboard entry screen; funny thing is, everything else in dash appears to be working (can access each module, settings, post, edit theme, etc.,) -- the site is still up and accepting posts as well. Scratching my head; just upgraded to 2.5 last night and it started then.

  4. cornerhost
    Member
    Posted 6 years ago #

    This is a bug in wordpress. It's going through a list of lists of stuff in the sidebar, and adding up the lengths of each list. The problem is that the initial sum is NULL rather than 0. Fix is to add ,0 right before the last end paren.

    Like so:

    $num_widgets = array_reduce( $sidebars_widgets, create_function( '$prev, $curr', 'return $prev+count($curr);' ), 0 );

  5. SidVision
    Member
    Posted 6 years ago #

    Nice fix. It worked for me. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic