updated plugin Jetpack Protect
version 3.0.2
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
* @package automattic/jetpack-autoloader
|
||||
*/
|
||||
|
||||
namespace Automattic\Jetpack\Autoloader\jpc4802e05bbcf59fd3b6350e8d3e5482c_protectⓥ2_2_0\al3_0_7;
|
||||
namespace Automattic\Jetpack\Autoloader\jpc4802e05bbcf59fd3b6350e8d3e5482c_protectⓥ3_0_2\al3_1_0;
|
||||
|
||||
// phpcs:ignore
|
||||
|
||||
@ -79,7 +79,7 @@ class PHP_Autoloader {
|
||||
public static function load_class( $class_name ) {
|
||||
global $jetpack_autoloader_loader;
|
||||
if ( ! isset( $jetpack_autoloader_loader ) ) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
$file = $jetpack_autoloader_loader->find_class_file( $class_name );
|
||||
@ -87,6 +87,24 @@ class PHP_Autoloader {
|
||||
return false;
|
||||
}
|
||||
|
||||
// A common source of strange and confusing problems is when a vendor
|
||||
// file is autoloaded before all plugins have had a chance to register
|
||||
// with the autoloader. Detect that, if a development constant is set.
|
||||
if ( defined( 'JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS' ) && JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS &&
|
||||
( strpos( $file, '/vendor/' ) !== false || strpos( $file, '/jetpack_vendor/' ) !== false ) &&
|
||||
is_callable( 'did_action' ) && ! did_action( 'plugins_loaded' )
|
||||
) {
|
||||
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_wp_debug_backtrace_summary -- This is a debug log message.
|
||||
$msg = "Jetpack Autoloader: Autoloading `$class_name` before the plugins_loaded hook may cause strange and confusing problems. " . wp_debug_backtrace_summary( '', 1 );
|
||||
// @todo Remove the is_callable check once we drop support for WP 6.5.
|
||||
if ( is_callable( 'wp_trigger_error' ) ) {
|
||||
wp_trigger_error( '', $msg );
|
||||
} else {
|
||||
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
|
||||
trigger_error( $msg );
|
||||
}
|
||||
}
|
||||
|
||||
require $file;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user