Title: 2 errors when using PHP 8.1
Last modified: March 21, 2022

---

# 2 errors when using PHP 8.1

 *  [jenskirk](https://wordpress.org/support/users/jenskirk/)
 * (@jenskirk)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/2-errors-when-using-php-8-1/)
 * Hi 🙂
 * Using PHP 8.1 we get these PHP errors:
 *     ```
       [21-Mar-2022 11:11:56 UTC] PHP Warning:  Attempt to read property "ID" on null in /home/xxxxxxxxx/public_html/wp-content/plugins/pagerestrict/pagerestrict.php on line 155
       [21-Mar-2022 11:11:56 UTC] PHP Warning:  Attempt to read property "ID" on null in /home/xxxxxxxxx/public_html/wp-content/plugins/pagerestrict/pagerestrict.php on line 163
       ```
   
 * We are using latest version of the plugin.
 * Can you fix this?
 * Thank you 🙂
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2F2-errors-when-using-php-8-1%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [lekiend](https://wordpress.org/support/users/lekiend/)
 * (@lekiend)
 * [4 years ago](https://wordpress.org/support/topic/2-errors-when-using-php-8-1/#post-15640276)
 * Yes, same issue with PHP 7.4

Viewing 1 replies (of 1 total)

The topic ‘2 errors when using PHP 8.1’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [lekiend](https://wordpress.org/support/users/lekiend/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/2-errors-when-using-php-8-1/#post-15640276)
 * Status: not resolved