Commit 173951f6f2af049ae39179049afb1fb13a3f7b1c

Authored by Nathanael Jourdane
1 parent 87467502

Display the getService error

Showing 1 changed file with 6 additions and 4 deletions   Show diff stats
php/epntap.php
@@ -59,9 +59,12 @@ function getServices() { @@ -59,9 +59,12 @@ function getServices() {
59 } 59 }
60 } 60 }
61 return $services; 61 return $services;
62 - } else if($i === count($registriesURL)-1) {  
63 - error_log("Can not access any of these services : " . implode(', ', $registriesURL) . ".");  
64 - return; 62 + } else {
  63 + error_log('getServices error: ' . $services['error']);
  64 + if($i === count($registriesURL)-1) {
  65 + error_log("Can not access any of these registries : " . implode(', ', $registriesURL) . ", check the internet connexion.");
  66 + return;
  67 + }
65 } 68 }
66 } 69 }
67 } 70 }
@@ -122,7 +125,6 @@ function request($access_url, $query) { @@ -122,7 +125,6 @@ function request($access_url, $query) {
122 $url = $access_url . '/sync?' . $params . '&QUERY=' . urlencode(preg_replace('/\s+/', ' ', $query)); // remove also multiple whitespaces 125 $url = $access_url . '/sync?' . $params . '&QUERY=' . urlencode(preg_replace('/\s+/', ' ', $query)); // remove also multiple whitespaces
123 126
124 $votMgr->load($url); 127 $votMgr->load($url);
125 -  
126 $result = $votMgr->parseStream(); 128 $result = $votMgr->parseStream();
127 return $votMgr->getVotableError() ? array('error' => $votMgr->getVotableError()) : $result; 129 return $votMgr->getVotableError() ? array('error' => $votMgr->getVotableError()) : $result;
128 } 130 }