wp/wp-includes/class-wp-recovery-mode.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
--- a/wp/wp-includes/class-wp-recovery-mode.php	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/class-wp-recovery-mode.php	Fri Sep 05 18:40:08 2025 +0200
@@ -11,6 +11,7 @@
  *
  * @since 5.2.0
  */
+#[AllowDynamicProperties]
 class WP_Recovery_Mode {
 
 	const EXIT_ACTION = 'exit_recovery_mode';
@@ -361,7 +362,7 @@
 		$error_file    = wp_normalize_path( $error['file'] );
 		$wp_plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
 
-		if ( 0 === strpos( $error_file, $wp_plugin_dir ) ) {
+		if ( str_starts_with( $error_file, $wp_plugin_dir ) ) {
 			$path  = str_replace( $wp_plugin_dir . '/', '', $error_file );
 			$parts = explode( '/', $path );
 
@@ -378,7 +379,7 @@
 		foreach ( $wp_theme_directories as $theme_directory ) {
 			$theme_directory = wp_normalize_path( $theme_directory );
 
-			if ( 0 === strpos( $error_file, $theme_directory ) ) {
+			if ( str_starts_with( $error_file, $theme_directory ) ) {
 				$path  = str_replace( $theme_directory . '/', '', $error_file );
 				$parts = explode( '/', $path );
 
@@ -412,7 +413,7 @@
 		$network_plugins = wp_get_active_network_plugins();
 
 		foreach ( $network_plugins as $plugin ) {
-			if ( 0 === strpos( $plugin, $extension['slug'] . '/' ) ) {
+			if ( str_starts_with( $plugin, $extension['slug'] . '/' ) ) {
 				return true;
 			}
 		}