com web/php: Fix undefined index warning and remove a commendedout code: ug.php
| From: | Paul Dragoonis | Date: | Mon, 31 Mar 2014 18:21:41 +0000 |
| Subject: | com web/php: Fix undefined index warning and remove a commendedout code: ug.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-22124@lists.php.net to get a copy of this message | ||
Commit: 91a4316cbc1001147ccc1b0e367362cf5557fb49
Author: Hannes Magnusson <bjori@mongodb.com> Mon, 31 Mar 2014 11:21:41 -0700
Parents: 44bb7536c361c3e535103e9b11d3ed0318f745b4
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=91a4316cbc1001147ccc1b0e367362cf5557fb49
Log:
Fix undefined index warning and remove a commendedout code
Changed paths:
M ug.php
Diff:
diff --git a/ug.php b/ug.php
index 50103ac..8577a97 100644
--- a/ug.php
+++ b/ug.php
@@ -98,10 +98,10 @@ function print_ug_matches($matches) {
echo "</dl>";
}
-//$COUNTRY_ALPHA_2 = get_alpha2_country_from_alpha3($COUNTRY);
$country = isset($_GET["cc"]) ? $_GET["cc"] : $COUNTRY;
+$country_alpha_2 = isset($COUNTRY_ALPHA_3_TO_2[$country]) ? $COUNTRY_ALPHA_3_TO_2[$country] :
"NA";
$allcountries = array();
-$matches = get_usergroups_in($COUNTRY_ALPHA_3_TO_2[$country], $allcountries);
+$matches = get_usergroups_in($country_alpha_2, $allcountries);
if (isset($COUNTRIES[$country])) {
print_cc_header($country);
print_ug_matches($matches);