Support » Fixing WordPress » update-core.php thows “Error thrown Cannot use object of type stdClass as array”

  • Resolved Hoosierboy

    (@hoosierboy)


    Trying to update from 4.9.2 to 4.9.4. Multisite installation. Operating from the NetworkAdmin dashboard. When I click on any of the links that lead to the update-core.php code, I get

    Error thrown

    Cannot use object of type stdClass as array

    I’m running WordPress 4.9.2 (Get Version 4.9.4) | PHP 7.0.22 | Apache | MySQL 10.2.12-MariaDB-log

    The websites continue to run and users do not seem to have any problems. I updated a page earlier in the day without problems.

    • This topic was modified 3 years, 7 months ago by Hoosierboy.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator t-p

    (@t-p)

    Cannot use object of type stdClass as array

    Is this the complete error message?

    Thread Starter Hoosierboy

    (@hoosierboy)

    Yes. The body of the html page is exactly two lines:
    <h1>Error thrown</h1>
    <p>Cannot use object of type stdClass as array</p>

    I just logged in to try and update some plugins. When I went to the dashboard/update area (2 plugins needed to be updated); no selections showed but the following error did show: Fatal error: Cannot use object of type stdClass as array in /home/nhwgao5/public_html/testbed9051/wp-admin/update-core.php at line …

    Same error on both my test and live site. I am running wordpress 4.9.4.

    I am experiencing the same issue! It says I have 3 updates, when I go to review them, this message is showing – Fatal error: Cannot use object of type stdClass as array in /home/frendloo/staging/1/wp-admin/update-core.php on line 258

    I am running wordpress 4.9.4

    • This reply was modified 3 years, 7 months ago by donnynewera.

    Same issue here on multiple sites, running WP v4.9.4

    Here you can find some info about the stacktrace: https://imgur.com/a/7C9AO

    It seems like here are some object checks missing.

    It happens on the updates overview page, when pending plugin updates get listed. The output of the site stops after a few plugins here.

    PS: This issue already occurred a few months earlier to me.

    • This reply was modified 3 years, 7 months ago by flowdee.

    By any chance are any of you running the plugin wpforms? If you are ensure that you update it. I had the same issue, and had to update the wpforms through wpcli. Looks like they just pushed out a patch version;

    +---------+-------------+-------------+---------+
    | name    | old_version | new_version | status  |
    +---------+-------------+-------------+---------+
    | wpforms | 1.4.4       | 1.4.4.1     | Updated |
    +---------+-------------+-------------+---------+
    • This reply was modified 3 years, 7 months ago by jkenyon84.

    Yes using this update as well.

    But anyway WordPress’s “list_plugin_updates” function shouldn’t crash in case a plugin did something wrong…

    Yup, I was using WPForms as well. New update released removed the error and it updated fine. But still, it shouldn’t have crashed the updates sections

    Thread Starter Hoosierboy

    (@hoosierboy)

    Well, I don’t use wp forms, but I had several other plugins waiting for updates. I updated them from the plugin page, one at a time, and then tried update-core again. This time it worked and I have now updated to the latest wordpress version. I agree that there is a robustness issue with update-core. Plugins should not be able to disable it!!!

    deactivate the plugin that showing need to be update

    you make sure the plugin is not (Nulled)

    some companies add scripts to miss around with your wordpress in case you did not purchase

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘update-core.php thows “Error thrown Cannot use object of type stdClass as array”’ is closed to new replies.