Update of /cvsroot/phpweather/phpweather/output
In directory usw-pr-cvs1:/tmp/cvs-serv5905/output
Modified Files:
pw_images.php pw_text.php
Log Message:
All constructors can now be called without any parameters - they all
use an empty array as the default. This was removed some time ago
because it didn't work in PHP3, but now that we're using PHP4 it works
again.
I also made an extra check in output/pw_text.php so that missing
clouds no longer trigger a warning.
Index: pw_images.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_images.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- pw_images.php 26 Mar 2002 18:39:45 -0000 1.4
+++ pw_images.php 15 May 2002 22:23:26 -0000 1.5
@@ -226,7 +226,7 @@
var $weather = null;
- function pw_images($w, $input) {
+ function pw_images($w, $input = array()) {
$this->weather = $w;
Index: pw_text.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- pw_text.php 12 May 2002 15:08:24 -0000 1.10
+++ pw_text.php 15 May 2002 22:23:26 -0000 1.11
@@ -45,7 +45,7 @@
* @param phpweather The object with the weather.
* @access public
*/
- function pw_text($w, $input) {
+ function pw_text($w, $input = array()) {
$this->weather = $w;
/* We call the parent constructor. */
@@ -1077,7 +1077,8 @@
/*******************
* Cloudgroups *
*******************/
- if (!in_array('clouds', $this->properties['exclude'])) {
+ if (!in_array('clouds', $this->properties['exclude']) &&
+ !empty($clouds)) {
$output['clouds'] = $this->print_pretty_clouds($clouds);
}
|