WordPress.org

Make WordPress Core

Ticket #24747: 24747.patch

File 24747.patch, 1.1 KB (added by SergeyBiryukov, 20 months ago)
  • wp-admin/includes/plugin-install.php

     
    229229                                if ( current_user_can('install_plugins') ) 
    230230                                        $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug); 
    231231                        } else { 
    232                                 $key = array_shift( $key = array_keys($installed_plugin) ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers 
     232                                $key = array_keys( $installed_plugin ); 
     233                                $key = array_shift( $key ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers 
    233234                                if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){ 
    234235                                        $status = 'latest_installed'; 
    235236                                } elseif ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '<') ) {