• wp-content/plugins/guild-armory-roster/WoWArmoryTable.php:295
    $lang is undefined

    adding $lang = ‘en_US’; fixes the issue however it is recommended to utilize lang setting properly.

    I will likely not respond to requests for assistance on fixing your wordpress site if you are having issues. The creator needs to fix the code.

        function get_chars()
        {
            $options = get_option( 'wow_arsenal_table_options' );
    		
            $guild = $options['guildname'];
    	$guild = str_replace(' ','%20',$guild);
    
            $server = $options['server'];
            $server = str_replace(' ','%20',$server);
    
            $region = $options['region'];
            $region = strtolower($region);
    
            $this->get_classes(get_locale());
    
            $guildm_data = file_get_contents('https://'.$region.'.api.battle.net/wow/guild/'.$server.'/'.$guild.'?fields=members&locale='.$lang.'&apikey=y5xtbfs6869qcgm2e2czdf4bz9uke8ht');
            		$guildm_data = json_decode($guildm_data);
            $members = $guildm_data->members;
    		
    
            $this->save_chars($members);
        }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter 0sanity

    (@0sanity)

    Also this is incorrect too
    wp-content/plugins/guild-armory-roster/WoWArmoryTable.php:364

    It has locale set to locale=de_DE

    the get_classes method has
    if($lang == “”)
    $lang = get_locale();

    I suggest making a method for all these other methods

    function getLang($lang) {
        return empty($lang) ? get_locale() : $lang;
    }

    Then just use $this->getLang() or $this->getLang($lang) wherever you need it

    Thread Starter 0sanity

    (@0sanity)

    Apologies I posted this in the older version of the plugin, I will make a new post in the newer version

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Undefined variable in 0.5.1’ is closed to new replies.