WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Cannot use object of type stdClass as (8 posts)

  1. Anonymous
    Unregistered
    Posted 9 years ago #

    Fatal error: Cannot use object of type stdClass as array in /usr/local/apache/htdocs/trefle/blog/wp-admin/upgrade-functions.php on line 705
    Please help me out of this problem.....

  2. Mark Jaquith
    WordPress Lead Dev
    Posted 9 years ago #

    What version of WordPress? (1.2, 1.3 nightly, current CVS)

  3. Anonymous
    Unregistered
    Posted 9 years ago #

    Change the line 705 from this:
    if ($res[0]['Type'] != 'varchar(32)') {
    to this:
    if ($res[0]->Type != 'varchar(32)') {

  4. Turnip
    Member
    Posted 9 years ago #

    I had that error when I was installing WP locally after installing a new server (LAMPP). I struggled with it for ages... but it seems to be a problem with PHP5. Delete the database, and recreate it. Switch to PHP4 (if you can), and try it again. Worked for me. If you are using LAMPP then this will switch to PHP4:
    # /opt/lampp/lampp php4

  5. Anonymous
    Unregistered
    Posted 9 years ago #

    I was installing XAMPP 1.4.9 on Windows XP locally and came up with the same error in my WP 1.2.1 Mingus installation. Editing line 705 as suggested above solved the problem.

  6. Anonymous
    Unregistered
    Posted 9 years ago #

    Thanks very very much - that did it. I actually just downloaded WordPress (version 1.2). I wonder if this change be made by someone in CVS? Just about prevented me from using WordPress - other than this installation was a snap.
    thanks to all the volunteers - I really appreciate this software - looks great!
    Tim

  7. error
    Member
    Posted 9 years ago #

    This has indeed been fixed for some time in the 1.3 code.

  8. Anonymous
    Unregistered
    Posted 9 years ago #

    Another way to fix the error is to change the line before it (704)...
    $res = $wpdb->get_results($query);
    to this:
    $res[] = $wpdb->get_results($query);

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.