WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] The annoying "Warning: Attempt to assign property of non-object" error again :( (2 posts)

  1. thephpoldbie
    Member
    Posted 6 years ago #

    Well I changed hosts from a virtual server to a faster more dedicated VPN host and thought some things would run better right? Wrong, as with the 1st error I still keep getting this error randomly:

    Warning: Attempt to assign property of non-object in /var/www/htdocs/wp-includes/post.php on line 585

    And of course many times the error will be multilined with other errors but it's pretty much the same (i.e. Warning: Attempt to assign property of non-object in /var/www/hhev/wp-includes/post.php on line 584).

    Pretty annoying that it comes up so randomly, like just recently I just got it when deactivating a plugin... many times stuff still processes (like the plugin still deactivated) since it's probably just a warning (as oppossed to a fatal error which would make life even more annoying). Sometimes it occurs when going to a random post or performing some random action in /wp-admin.

    So Will I have to change anything on the server setup in a config file or anything? Or is this a wordpress issue? Much thanks for any help in this issue (even more thanks if it resolves my problems :D )

  2. thephpoldbie
    Member
    Posted 6 years ago #

    Resolved it by fiddling with the errors reporting area of the php.ini file (error_reporting) with that offering many different ways of killing PHP warnings from showing up in WordPress site (log it to a log file or just have them not show up at all). In my case I just had the warnings output to a errors log which is of course a text file using the error_log parameter. Thus if one ever comes across a fatal error on my site then it'll just output to this text file without looking all ugly & scary (and giving folks info that would compromise me security wise).

    Thus if you running a site on a machine or server you have control over just fiddle with php.ini file (of course google to see what steps to take if you're unsure), if you on a host where you don't have such access like shared hosting, then ask them if they can fix things up for you (or see if this can be controlled via htaccess which I'm not sure of... but it's possible).

Topic Closed

This topic has been closed to new replies.

About this Topic