WordPress.org

Make WordPress Core

Ticket #28577: 28577-upgrade.diff

File 28577-upgrade.diff, 630 bytes (added by michalzuber, 3 years ago)

Parameter from function is not an object

  • wp-admin/includes/upgrade.php

    diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
    index 6e4fd80..a9c5d4e 100644
    a b function wp_get_available_translations() { 
    22132213function wp_install_download_language_pack( $language ) { 
    22142214        // Check if the language is already installed. 
    22152215        $available_languages = get_available_languages(); 
    2216         if ( in_array( $language->language, $available_languages ) ) { 
    2217                 return $language->language; 
     2216        if ( in_array( $language, $available_languages ) ) { 
     2217                return $language; 
    22182218        } 
    22192219 
    22202220        // Confirm the language is one we can download.