Title: Warning: Creating default object from empty value
Last modified: August 20, 2016

---

# Warning: Creating default object from empty value

 *  [greendolphin](https://wordpress.org/support/users/greendolphin/)
 * (@greendolphin)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-2/)
 * Warning: Creating default object from empty value in \pagerestrict\pagerestrict.
   php on line 65.
 * This appears on the login page. I am using the latest version 2.07.
 * The plugin worked fine before i upgraded to the latest version of xampp.
    Thanks
   for your assistance.
 * Green Dolphin
 * [http://wordpress.org/extend/plugins/pagerestrict/](http://wordpress.org/extend/plugins/pagerestrict/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [caoyue2913](https://wordpress.org/support/users/caoyue2913/)
 * (@caoyue2913)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-2/#post-3210294)
 * I have got the same problem. I’m working with wordpress 3.42
 *  [caoyue2913](https://wordpress.org/support/users/caoyue2913/)
 * (@caoyue2913)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-2/#post-3210295)
 * Hi, greendolphin, it seems i have just solve this problem. Just open the \pagerestrict\
   pagerestrict.php file, replace the “->” in line 65 with “_”. It do works for 
   me!
 *  [relish1227](https://wordpress.org/support/users/relish1227/)
 * (@relish1227)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-2/#post-3210352)
 * I noticed a similar warning with a different plugin ([http://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility?replies=6#post-3706704](http://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility?replies=6#post-3706704))
   after upgrading to PHP 5.4. Guessing that this also somehow relates to PHP 5.4?
 * I actually just commented out that line 65, as it just seems to be setting the
   comment_status to closed. (Thinking it wouldn’t affect me because I don’t have
   comments open anyways). That resolved the issue for now. However, would be better
   if this was in the next plugin upgrade. Whaddya think, plugin authors?
 * Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Warning: Creating default object from empty value’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/pagerestrict.svg)
 * [Page Restrict](https://wordpress.org/plugins/pagerestrict/)
 * [Support Threads](https://wordpress.org/support/plugin/pagerestrict/)
 * [Active Topics](https://wordpress.org/support/plugin/pagerestrict/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pagerestrict/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pagerestrict/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [relish1227](https://wordpress.org/support/users/relish1227/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-2/#post-3210352)
 * Status: not resolved