• Resolved Paweł

    (@mrpauloen)


    Hi guys.

    There is something wrong with get_countrycodes() function in tools.php file, because I get constantly this PHP error:

    [25-Feb-2018 10:14:13 UTC] PHP Notice:  Undefined variable: country_codes in 
    ../wp-content/plugins/google-analytics-dashboard-for-wp/tools/tools.php on line 20

    I figured that:

    		public static function get_countrycodes() {
    			include_once 'iso3166.php';
    			return $country_codes;
    		}

    include_once doesn’t include (or doesn’t assing values to variable?) that file and that’s why $country_codes is not defined.

    But, when I changed it to include (or require) it seems to be ok and no error are returned.

    Cheers

    The page I need help with: [log in to see the link]

The topic ‘Undefined variable: country_codes’ is closed to new replies.