10up / restricted-site-access

Limit access to visitors who are logged in or allowed by IP addresses. Includes many options for handling blocked visitors.
http://10up.com/plugins/restricted-site-access-wordpress/
GNU General Public License v2.0
230 stars 48 forks source link

PHP 8.1 Compat #284

Closed turtlepod closed 10 months ago

turtlepod commented 10 months ago

Tested in PHP 8.1: "PHP message: PHP Deprecated: Automatic conversion of false to array is deprecated in /var/www/wp-content/plugins/restricted-site-access/restricted_site_access.php on line 319"

Description of the Change

Simple change to make sure $options var is array and not produce warning in PHP 8.1+

Closes #

How to test the Change

Test in PHP 8.1+ and simply check the error log

Changelog Entry

Fixed: PHP 8.1 compat for get_options()

Added - New feature Changed - Existing functionality Deprecated - Soon-to-be removed feature Removed - Feature Fixed - Bug fix Security - Vulnerability

Credits

@turtlepod

Props @username, @username2, ...

Checklist:

Sidsector9 commented 10 months ago

Thanks for the PR @turtlepod. A PR was already raised, so I will close this PR in favour of #281.