WordPress.org

Make WordPress Core

Ticket #49144: 49144.diff

File 49144.diff, 827 bytes (added by jeherve, 6 months ago)
  • src/wp-includes/script-loader.php

     
    285285        );
    286286        foreach ( $packages as $package ) {
    287                 $handle       = 'wp-' . $package;
    288                 $path         = "/wp-includes/js/dist/$package$suffix.js";
    289                 $asset_file   = include( ABSPATH . WPINC . "/assets/dist/$package$suffix.asset.php" );
     287                $handle = 'wp-' . $package;
     288                $path   = "/wp-includes/js/dist/$package$suffix.js";
     289
     290                if ( ! file_exists( $path ) ) {
     291                        continue;
     292                }
     293
     294                $asset_file   = include ABSPATH . WPINC . "/assets/dist/$package$suffix.asset.php";
    290295                $dependencies = $asset_file['dependencies'];
    291296                // Add dependencies that cannot be detected and generated by build tools.