CVS: phpweather/output pw_images.php,1.5,1.6
Brought to you by:
iridium
|
From: Martin G. <gim...@us...> - 2002-06-29 11:13:44
|
Update of /cvsroot/phpweather/phpweather/output
In directory usw-pr-cvs1:/tmp/cvs-serv13559
Modified Files:
pw_images.php
Log Message:
I hope this fixed the problems with $phenomena being undefined.
Index: pw_images.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_images.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- pw_images.php 15 May 2002 22:23:26 -0000 1.5
+++ pw_images.php 29 Jun 2002 11:13:41 -0000 1.6
@@ -292,12 +292,14 @@
// Ignore the others In case more then one exist, take only the
// first one (highest predominance).
ereg('(TS|RA|DZ|SN|SG|GR|GS|PE|IC|BR|FG)(..)*$',$part,$match);
- if ($match[1] != '') {
+ if (!empty($match[1])) {
$phenomena = $match[1];
} else {
ereg('(..)(TS|RA|DZ|SN|SG|GR|GS|PE|IC|BR|FG)(..)*$',$part,$match);
- if ($match[2] != '') {
+ if (!empty($match[2])) {
$phenomena = $match[2];
+ } else {
+ $phenomena = '#'; // No phenomena.
}
}
// Not each precipitation type has a single image with it.
|