• This plugin sometimes saves a null record to ip_range in the wp_uam_accessgroups table. This is later passed to the explode function in UserGroup.php. Passing null to explode is a fatal error in PHP 8 and it renders the site unusable until the record in the DB is corrected.

    Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, null given in /var/www/public/wp-content/plugins/user-access-manager/src/UserGroup/UserGroup.php:99

    This can be corrected by changing line UserGroup.php:134 to $this->ipRange = $dbUserGroup->ip_range ?? '';. This ensures that when the UserGroup is loaded from the database the ip_range will fallback to a string if the stored value is null.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Breaks with PHP 8’ is closed to new replies.