You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A temporary workaround, until it gets properly fixed, could be to utilize wpsimplesaml_idp_metadata_xml and pass an empty XML, if the field is empty:
/**
* Sanitize the SSO IDP metadata.
* Checks if the `ssoidp_metadata` option is empty, and if so, returns an empty XML string, to prevent a fatal error on PHP 8.
*
* @return string
*/
function sanitize_sso_idp_metadata(): string {
$sso_metadata = get_option( 'sso_idp_metadata' );
if ( empty( $sso_metadata ) ) {
return '<empty/>';
}
return $sso_metadata;
}
add_filter( 'wpsimplesaml_idp_metadata_xml', 'sanitize_sso_idp_metadata' );
It appears that we're passing an empty string if there is no XML file to pass to the PHP-SAML library. This is spilling PHP warnings.
Stack trace:
The text was updated successfully, but these errors were encountered: