If an entry in auth_saml2_idps is created by the admin settings screen (via the class setting_idpmetadata.php, line 181) then the field 'whitelist' will be null. (If you later edit it using the auth/saml2/availableidps.php script then it will probably be set to blank.)
When the field is null, it causes a warning in PHP 8.1 because the function check_whitelisted_ip_redirect calls core function is_ip_in_subnet_list with parameter 2 null. It then passes the null to core function 'explode' parameter 2, which now causes this warning:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/moodle/lib/classess/ip_utils.php on line 237
Since the code worked before, it should be fine to pass empty string instead.
If an entry in auth_saml2_idps is created by the admin settings screen (via the class setting_idpmetadata.php, line 181) then the field 'whitelist' will be null. (If you later edit it using the auth/saml2/availableidps.php script then it will probably be set to blank.)
When the field is null, it causes a warning in PHP 8.1 because the function check_whitelisted_ip_redirect calls core function is_ip_in_subnet_list with parameter 2 null. It then passes the null to core function 'explode' parameter 2, which now causes this warning:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/moodle/lib/classess/ip_utils.php on line 237
Since the code worked before, it should be fine to pass empty string instead.