Edit report at http://pear.php.net/bugs/bug.php?id=16928&edit=1
ID: 16928
Updated by: [email protected]
Reported By: pear at schmager dot de
Summary: getWeatherIcon() vs. grains
-Status: Open
+Status: Closed
Type: Bug
Package: Services_Weather
Operating System: Debian/Lenny
Package Version: 1.4.5
PHP Version: Irrelevant
-Assigned To:
+Assigned To: eru
Roadmap Versions:
New Comment:
-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!
Previous Comments:
------------------------------------------------------------------------
[2009-12-18 20:27:56] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16928&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.