Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.7

Bug #16928 getWeatherIcon() vs. grains
Submitted: 2009-12-19 01:27 UTC
From: jan_schmager Assigned: eru
Status: Closed Package: Services_Weather (version 1.4.5)
PHP Version: Irrelevant OS: Debian/Lenny
Roadmaps: (Not assigned)    
Subscription  


 [2009-12-19 01:27 UTC] jan_schmager (Jan Schmager)
Description: ------------ The function getWeatherIcon() returns a wrong result if the condition string contains "grains". In this case stristr matches with rain which is somehow wrong. File: Common.php Function: getWeatherIcon() Line: 927 Code: $rain = (bool) stristr($condition, "rain"); Test script: --------------- Metar example: 2009/12/18 18:20 ETNL 181820Z 08006KT 4000 -SG BKN013 BKN027 M11/M12 Q1012 GRN Expected result: ---------------- I'm not an expert but I suppose that the function should return code 13 or 14. Actual result: -------------- Function returns code 5.

Comments

 [2011-07-26 22:40 UTC] eru (Alexander Wirtz)
-Status: Open +Status: Closed -Assigned To: +Assigned To: eru
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Thanks for your report!