Support » Plugin: WordPress Move » [Plugin: WordPress Move] PHP Catchable fatal error: Object of class stdClass could not be converted

  • Resolved Gwyneth Llewelyn


    Hi! On a WordPress site running PHP 5.2.17, the following error, related to the WordPress Move plugin, pops up either on Simple or Advanced modes:

    PHP Catchable fatal error: Object of class stdClass could not be converted to string in /var/www/html/wp-content/plugins/wordpress-move/libs/functions-database-backup.php on line 198, referer: [...]

    This is traceable to the call

    $option = str_replace( $find, $replace, $option );

    after explicitly checking that $option is not an array. PHP 5.2 (and very likely 5.3 as well!) has some bugs in correctly parsing the line in this situation.

    Strangely, when changing line 198 to

    $option = str_replace( $find,
                            $option );

    (i.e. putting things on separate lines!) the error disappears…

    Now my next step is to figure out why the process never terminates 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Mert Yazıcıoğlu


    Could you please try changing line 197 which is:



    elseif ( ! is_object( $option ) )

    without splitting str_replace into seperate lines?

    I’m not OP, but had the same issue. That code change did fix the error for me, but the files didn’t seem to actually transfer.

    Update – manually moved the backup zip and sql files from the old server to the new, restored beautifully otherwise.

    Plugin Author Mert Yazıcıoğlu


    Change Domain Name mode does not transfer your files if that’s what you did. You need to use either Simple or Advanced Migration for that.

    I’m glad this solved the problem 🙂

    I was using Advanced Migration and it didn’t transfer the files.

    Plugin Author Mert Yazıcıoğlu


    Were there any errors or did it say “The migration has been completed successfully”?

    FTP transfers are actually handled by PemFTP, a third party library that comes with WordPress by default.

    No errors at all, said it was successful, but went far too quickly for the file transfers to have actually happened.

    Plugin Author Mert Yazıcıoğlu


    Than something exceptional must have happened during the operation. Plugin relies on what is returned by PemFTP, so it is possible that a rare situation like the one you experienced may cause PemFTP to think it was a success. Will have a look at that, thanks! 🙂

    Okay – I’ll open a new thread if it happens the next time I use it, thanks!

    @mert, doing the proposed changes definitely made the error go away.

    Now my biggest problem is that there are over 1 GByte in files, and thus the migration process never terminates, even letting it run for several hours hehe 🙂

    And I did increase the script timeouts 🙂

    Plugin Author Mert Yazıcıoğlu


    Technically speaking, WordPress Move should work on all WordPress installations regardless of their size. Handling lots of files might be causing PHP to hang, so could you please try migrating partially using the Advanced Migration and see if it works?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: WordPress Move] PHP Catchable fatal error: Object of class stdClass could not be converted’ is closed to new replies.