Opened 16 years ago

Closed 16 years ago

#4416 closed patch (fixed)

Prevent 'uninitialized' variable warnings in EnvCan weather grabber

Reported by: Joe Ripley <vitaminjoe@…> Owned by: ldunning
Priority: trivial Milestone: 0.21
Component: mythweather Version: head
Severity: low Keywords: Environment Canada weather grabber
Cc: stuartm Ticket locked: no

Description

When the envcan.pl script is run with perl -w (i.e. warnings), a bunch of harmless uninitialized variable warnings are printed on standard error. This may confuse some to believing the script isn't working.

To fix this, I've added checks to see if certain hash keys exist before they are checked for values.

Attachments (1)

4416.patch (6.5 KB) - added by Joe Ripley <vitaminjoe@…> 16 years ago.
Checks if certain variables are defined before attempting to access them

Download all attachments as: .zip

Change History (2)

Changed 16 years ago by Joe Ripley <vitaminjoe@…>

Attachment: 4416.patch added

Checks if certain variables are defined before attempting to access them

comment:1 Changed 16 years ago by Nigel

Resolution: fixed
Status: newclosed

(In [15648]) Patch to eliminate warnings, by Joe Ripley. Closes #4416. Also many whitespace changes (removed tabs, un-wrapped long lines)

Note: See TracTickets for help on using tickets.