Warning about 'default object from empty'
Works fine if I’m logged in. But the first-time visitor to my restricted page receives a PHP warning on my development web server:
Warning: Creating default object from empty value in D:\htdocs\sdbuildingtrades\wp-content\plugins\pagerestrict\pagerestrict.php on line 76
Where pagerestrict.php line 76 contains “$post->comment_status = ‘closed’;”
The warning appeared after moving the website to a new server, in effect upgrading several components at once: Apache 2.2.22 -> 2.4.4, MySQL 5.5.24 -> 5.6.12, PHP 5.3.13 -> 5.4.12, WordPress 3.1.2 -> 3.5.2. I know this hardly pins anything down, sorry.
Thanks in advance for any tips about work-arounds.
- The topic ‘Warning about 'default object from empty'’ is closed to new replies.