]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Command/WeatherCommand.php
Add markdown parsedown requirement
[airbundle] / Command / WeatherCommand.php
index 4b3ea402962ac1e3db318f185cd49cbf68f8a385..c2aae61dc4451ffcb5a8e0e3b1411745bd40168d 100644 (file)
@@ -343,11 +343,11 @@ class WeatherCommand extends DoctrineCommand {
                                        $hour = $type=='daily'?$type:$time->format('H');
 
                                        //Check data availability
                                        $hour = $type=='daily'?$type:$time->format('H');
 
                                        //Check data availability
-                                       //XXX: should never happen
-                                       #if (!isset($data[$zipcode][$dsm][$hour])) {
-                                       #       //Skip unavailable data
-                                       #       continue;
-                                       #}
+                                       //XXX: sometimes startup delay causes weather data to be unavailable for session first hour
+                                       if (!isset($data[$zipcode][$dsm][$hour])) {
+                                               //Skip unavailable data
+                                               continue;
+                                       }
 
                                        //Set info alias
                                        $info = $data[$zipcode][$dsm][$hour];
 
                                        //Set info alias
                                        $info = $data[$zipcode][$dsm][$hour];