Fix metar parsing issue
This commit is contained in:
@@ -993,7 +993,7 @@ class Metar implements \ArrayAccess
|
||||
$observed['amount'] = $found[2];
|
||||
}
|
||||
} // Cloud cover observed
|
||||
elseif (isset($found[5]) && !empty($found[5])) {
|
||||
elseif (isset($found[5]) && !empty($found[5]) && is_numeric($found[5])) {
|
||||
$observed['height'] = new Altitude($found[5] * 100, 'feet');
|
||||
|
||||
// Cloud height
|
||||
|
||||
@@ -82,6 +82,8 @@ class MetarTest extends TestCase
|
||||
{
|
||||
$metar = 'EGLL 261250Z AUTO 17014KT 8000 -RA BKN010/// '
|
||||
.'BKN016/// OVC040/// //////TCU 13/12 Q1008 TEMPO 4000 RA';
|
||||
|
||||
$parsed = Metar::parse($metar);
|
||||
}
|
||||
|
||||
public function testMetarTrends()
|
||||
|
||||
Reference in New Issue
Block a user