Skip to content

Commit f57cf3d

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60725 602fd350-edb4-49c9-b593-d223f7449a82
1 parent dc655bb commit f57cf3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-admin/includes/upgrade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,7 @@ function upgrade_690() {
24982498

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';
25042504
$key = array_search( $old_plugin, $active_plugins, true );

0 commit comments

Comments
 (0)