summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/getserviceproviders.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/usr/local/www/getserviceproviders.php b/src/usr/local/www/getserviceproviders.php
index b9fd2b1..e4d9f91 100644
--- a/src/usr/local/www/getserviceproviders.php
+++ b/src/usr/local/www/getserviceproviders.php
@@ -42,6 +42,7 @@ function get_country_providers($country) {
return is_array($sp['provider'][0]) ? $sp['provider'] : array($sp['provider']);
}
}
+ $provider_list = (is_array($provider_list)) ? $provider_list : array();
return $provider_list;
}
@@ -59,8 +60,12 @@ function country_list() {
function providers_list($country) {
$serviceproviders = get_country_providers($country);
- foreach ($serviceproviders as $sp) {
- echo $sp['name']['value'] . "\n";
+ if (is_array($serviceproviders)) {
+ foreach ($serviceproviders as $sp) {
+ echo $sp['name']['value'] . "\n";
+ }
+ } else {
+ $serviceproviders = array();
}
}
OpenPOWER on IntegriCloud