Make WordPress Core


Ignore:
Timestamp:
09/09/2025 03:32:08 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Cast get_option( 'active_plugins' ) to array in upgrade_690().

This resolves an error on Multisite networks where an individual site doesn't have plugins active:

array_search(): Argument #2 ($haystack) must be of type array, string given

Follow-up to [60666], [60721].

Props dd32.
See #53323.

File:
1 edited

Legend:

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

    r60721 r60725  
    24992499    if ( $wp_current_db_version < 60717 ) {
    25002500        // Switch Hello Dolly from file to directory format. See #53323
    2501         $active_plugins = get_option( 'active_plugins' );
     2501        $active_plugins = (array) get_option( 'active_plugins', array() );
    25022502        $old_plugin     = 'hello.php';
    25032503        $new_plugin     = 'hello-dolly/hello.php';
Note: See TracChangeset for help on using the changeset viewer.