[Phphtmllib-devel] SF.net SVN: phphtmllib:[3547] trunk/open2300/lib/modules/api/ AviationWeather.in
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2011-09-03 05:43:35
|
Revision: 3547 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3547&view=rev Author: hemna Date: 2011-09-03 05:43:29 +0000 (Sat, 03 Sep 2011) Log Message: ----------- fixed issue Modified Paths: -------------- trunk/open2300/lib/modules/api/AviationWeather.inc Modified: trunk/open2300/lib/modules/api/AviationWeather.inc =================================================================== --- trunk/open2300/lib/modules/api/AviationWeather.inc 2011-04-10 02:49:37 UTC (rev 3546) +++ trunk/open2300/lib/modules/api/AviationWeather.inc 2011-09-03 05:43:29 UTC (rev 3547) @@ -148,16 +148,18 @@ protected function get_runways(&$airport, &$wxInfo) { $runways = &$airport["runways"]; $info = array(); - - foreach($runways as &$runway) { - $number = $runway["runway_number"]; - $width = $runway["runway_width"] * 3.2808399; - $xw = $this->do_crosswind($runway, $wxInfo["Wind"]); - $info[] = array("runway" => $runway["runway_number"], - "length" => $runway["length"], - "crosswind" => $runway["crosswind"], - "headwind" => $runway["headwind"]); + + if ($runways != null && is_array($runways)) { + foreach($runways as &$runway) { + $number = $runway["runway_number"]; + $width = $runway["runway_width"] * 3.2808399; + $xw = $this->do_crosswind($runway, $wxInfo["Wind"]); + $info[] = array("runway" => $runway["runway_number"], + "length" => $runway["length"], + "crosswind" => $runway["crosswind"], + "headwind" => $runway["headwind"]); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |