Thatgeek – Previously Sonicpling

Saturday February 26, 2005

Weather Icon - Bug Fix

Filed under: General — Jeremiah @ 2:37 pm

Garett has come to my rescue once again, and fixed a bug in the WeatherIcon code that was causing Metric information to display incorrectly.

The newest version (1.1.10) is available here: weather.phps

if you want the whole shebang (icons and all), then check here: weather-hack.

2 Responses to “Weather Icon - Bug Fix”

  1. Kenny Says:

    I have version 1.1.7 and works great but every so often I get this error message.
    Warning: fread(): Length parameter must be greater than 0. in /www/k/mysite/htdocs/wp-content/plugins/weather.php on line 271

    Line 271 reads: $metar=fread($fp, filesize($metar_cache));

    Just wondering if you knew about this error? Thanks for the pluggin!

  2. Bob Crispen Says:

    When you display wind as knots, single-digit winds will have leading zeros. This change (in function speed()) fixes that:

    // Convert to knots
    case ‘ktKT’:
    return $part-0.0 . ” $wind_unit”; // from knots

Leave a Reply