--- a/wp/wp-includes/sitemaps/class-wp-sitemaps-registry.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/sitemaps/class-wp-sitemaps-registry.php Fri Sep 05 18:40:08 2025 +0200
@@ -14,6 +14,7 @@
*
* @since 5.5.0
*/
+#[AllowDynamicProperties]
class WP_Sitemaps_Registry {
/**
* Registered sitemap providers.
@@ -65,7 +66,7 @@
* @return WP_Sitemaps_Provider|null Sitemap provider if it exists, null otherwise.
*/
public function get_provider( $name ) {
- if ( ! isset( $this->providers[ $name ] ) ) {
+ if ( ! is_string( $name ) || ! isset( $this->providers[ $name ] ) ) {
return null;
}