Make WordPress Core


Ignore:
Timestamp:
06/27/2023 02:20:18 PM (18 months ago)
Author:
Bernhard Reiter
Message:

Editor: update Wordpress npm packages.

Updates the wordpress npm packages and their dependencies to the latest versions, as well as auto-updates to relevant core PHP files.

Props youknowriad, joemcgill, spacedmonkey, ramonopoly, peterwilsoncc, bernhard-reiter, tyxla, dmsnell.
Fixes #58623.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/load.php

    r56042 r56065  
    7474
    7575    // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests.
    76     if ( isset( $_SERVER['SCRIPT_FILENAME'] ) && str_ends_with( $_SERVER['SCRIPT_FILENAME'], 'php.cgi' ) ) {
     76    if ( isset( $_SERVER['SCRIPT_FILENAME'] )
     77        && ( strpos( $_SERVER['SCRIPT_FILENAME'], 'php.cgi' ) === strlen( $_SERVER['SCRIPT_FILENAME'] ) - 7 )
     78    ) {
    7779        $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];
    7880    }
    7981
    8082    // Fix for Dreamhost and other PHP as CGI hosts.
    81     if ( isset( $_SERVER['SCRIPT_NAME'] ) && str_contains( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) ) {
     83    if ( isset( $_SERVER['SCRIPT_NAME'] ) && ( strpos( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) !== false ) ) {
    8284        unset( $_SERVER['PATH_INFO'] );
    8385    }
     
    878880    }
    879881    while ( ( $plugin = readdir( $dh ) ) !== false ) {
    880         if ( str_ends_with( $plugin, '.php' ) ) {
     882        if ( '.php' === substr( $plugin, -4 ) ) {
    881883            $mu_plugins[] = WPMU_PLUGIN_DIR . '/' . $plugin;
    882884        }
     
    920922    foreach ( $active_plugins as $plugin ) {
    921923        if ( ! validate_file( $plugin )                     // $plugin must validate as file.
    922             && str_ends_with( $plugin, '.php' )             // $plugin must end with '.php'.
     924            && '.php' === substr( $plugin, -4 )             // $plugin must end with '.php'.
    923925            && file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist.
    924926            // Not already included as a network plugin.
     
    15501552    $bytes = (int) $value;
    15511553
    1552     if ( str_contains( $value, 'g' ) ) {
     1554    if ( false !== strpos( $value, 'g' ) ) {
    15531555        $bytes *= GB_IN_BYTES;
    1554     } elseif ( str_contains( $value, 'm' ) ) {
     1556    } elseif ( false !== strpos( $value, 'm' ) ) {
    15551557        $bytes *= MB_IN_BYTES;
    1556     } elseif ( str_contains( $value, 'k' ) ) {
     1558    } elseif ( false !== strpos( $value, 'k' ) ) {
    15571559        $bytes *= KB_IN_BYTES;
    15581560    }
     
    18331835    if ( isset( $_SERVER['HTTP_ACCEPT'] ) ) {
    18341836        foreach ( $accepted as $type ) {
    1835             if ( str_contains( $_SERVER['HTTP_ACCEPT'], $type ) ) {
     1837            if ( false !== strpos( $_SERVER['HTTP_ACCEPT'], $type ) ) {
    18361838                return true;
    18371839            }
Note: See TracChangeset for help on using the changeset viewer.