Block refiling of PIREPs (#1167)

* Block refiling of PIREPs

* Style fixes

* Package updates
This commit is contained in:
Nabeel S
2021-05-03 10:00:10 -04:00
committed by GitHub
parent 5094375e13
commit fe0ef60b6c
7 changed files with 518 additions and 383 deletions

View File

@@ -48,6 +48,10 @@ class AviationWeather extends Metar
$res = $this->httpClient->get($url, []);
$xml = simplexml_load_string($res);
if ($xml->errors && count($xml->errors->children()) > 0) {
return '';
}
$attrs = $xml->data->attributes();
if (!isset($attrs['num_results'])) {
return '';