Forums

Catchable fatal error in wp-db.php on line 429 (18 posts)

  1. philgons
    Member
    Posted 3 years ago #

    I just updated to 2.7b3 from 2.7b2.

    Now my sidebar loads only partially. I get this message in my sidebar and on the widgets page in the admin panel:

    Catchable fatal error: Object of class stdClass could not be converted to string in /home/philgons/public_html/wp-includes/wp-db.php on line 429

    I tried switching themes, deactivating plugins, reinstalling, repairing my database. Nothing fixes it. I'd try removing widgets, but there is no button to save changes to the widgets.

    I updated several other blogs to 2.7b3 with no problems.

    Any ideas? Anyone else having problems?

  2. Ryan Hellyer
    Member
    Posted 3 years ago #

    Yep, I upgraded from 2.7 beta 1 to beta 3 and got exactly the same error :(

    I have no idea what is causing it though. It is occurring with the default theme and no plugins activated.

  3. Ryan Hellyer
    Member
    Posted 3 years ago #

    I fixed it by removing line 429. I have no idea if that will have other ramifications though, but it seems to have fixed it in the mean time.

  4. Ryan Hellyer
    Member
    Posted 3 years ago #

    I take that back. It didn't work at all and caused even more errors to show up.

    I did definitely fix it by downgrading to 2.6.3 though. Overwriting the files with the old ones seemed to do the trick.

  5. Pascal Dreissen
    Member
    Posted 3 years ago #

    Fix this by ommitting the addslashes function:

    Change the
    return addslashes( $string );

    into:

    return $string;

  6. Pascal Dreissen
    Member
    Posted 3 years ago #

    However much better is to use it like this (for people who don't have any problem when using magic quotes:

    Remove line 429 (return addslashes($string);)

    Replace it with this code:

    if (!get_magic_quotes_gpc()) {
    return addslashes($string);
    } else {
    return $string;
    }

  7. beachbum
    Member
    Posted 3 years ago #

    I also have the same problem on one of my sites. trying to narrow the plugin problem down.

  8. beachbum
    Member
    Posted 3 years ago #

    if (!get_magic_quotes_gpc()) {
    return addslashes($string);
    } else {
    return $string;
    }

    didnt work for me but

    Change the
    return addslashes( $string );

    into:

    return $string;

    did :)

  9. mrmist
    Forum Janitor
    Posted 3 years ago #

    This

    Catchable fatal error: Object of class stdClass could not be converted to string in /home/philgons/public_html/wp-includes/wp-db.php on line 429

    Relates to the Pages widget which seems broken. Some issue is affecting Pages that have parent Pages. I have raised ticket 8245 for it and other issues.

  10. Ryan Hellyer
    Member
    Posted 3 years ago #

    Thanks for the updates.

  11. philgons
    Member
    Posted 3 years ago #

    Thanks for all the replies.

    ryanhellyer, removing line 429 didn't work, but, pdreissen, both of your suggestions did fix that problem. However, I started getting a different problem, so I rolled back to 2.7b1.

    mrmist, good to know the cause of the problem. I removed the pages widget and may trying upgrading again. We'll see.

  12. philgons
    Member
    Posted 3 years ago #

    mrmist, I removed the pages widget and reinstalled 2.7b3, but I still get the same fatal error. I wonder if there are some other conflicts?

  13. mrmist
    Forum Janitor
    Posted 3 years ago #

    I expect that there are. Even if you do remove the Pages widget, you won't be able to properly manage pages in the beta 3 until the bug is resolved, because the view page list function is not properly dealing with child/parent pages.

  14. mrmist
    Forum Janitor
    Posted 3 years ago #

    post.php has been fixed now so if you fetch the latest svn you should be rid of this error.

  15. philgons
    Member
    Posted 3 years ago #

    Cool. Just updated, and all seems to be good. Thanks for the tip, mrmist.

  16. BestofNJ.com
    Member
    Posted 3 years ago #

    I am having this problem now showing up when I try to change my password and I am completely up to date.

  17. BestofNJ.com
    Member
    Posted 3 years ago #

    This simple fix worked for me:

    pdreissen
    Member
    Posted 6 months ago #
    Fix this by ommitting the addslashes function:

    Change the
    return addslashes( $string );

    into:

    return $string;

  18. BestofNJ.com
    Member
    Posted 3 years ago #

    Update:

    I have posted this problem in several places on the support forum and I am not trying to monopolize the podium here. I just wanted to state to anyone that comes along after me that encounters this same problem, this simple fix worked until I tried to make a new post. Now I cannot post any new posts or pages to my blog and the fix broke my blog!

    Be very careful with this. It may not work for you. It might make your problems worse as it did mine.

    I honestly wish that there was someone that knew PHP that could give me some idea of what might be wrong here. What exactly is that error code trying to tell me?

    To document this a bit better, here is what is happening with my blog now:

    I can write and edit in my fckeditor text box in visual or html mode, but when I hit update or publish, my information is stripped out of the box and disappears completely. It will take very short posts. I have no idea what is going on. It will take and publish a post that consists of the word test or maybe three paragraphs, but that is all.

    John

Topic Closed

This topic has been closed to new replies.

About this Topic