Fix metar parsing issue

This commit is contained in:
Kevin
2018-08-29 07:27:53 +08:00
parent e5935507c8
commit 75ef658d8f
2 changed files with 3 additions and 1 deletions

View File

@@ -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