Issues with 3in1 script

Guys,

I still need help with errors being generated by the script. I’m not alone as I have been contacted by other members about this.

The script seems to work correctly, however I am getting PHP warning errors with respect to function.max errors i.e the parameter must be an array. The errors always point to lines 210, 212, 225, 236,249 and 250 of wxall.lastret.php.

[28-Dec-2012 21:45:39 Europe/London] PHP Warning: max() [function.max]: When only one parameter is given, it must be an array in /home/bears498/public_html/wxsim/wxall.lastret.php on line 210
[28-Dec-2012 21:45:39 Europe/London] PHP Warning: max() [function.max]: When only one parameter is given, it must be an array in /home/bears498/public_html/wxsim/wxall.lastret.php on line 212
[28-Dec-2012 21:45:39 Europe/London] PHP Warning: max() [function.max]: When only one parameter is given, it must be an array in /home/bears498/public_html/wxsim/wxall.lastret.php on line 225
[28-Dec-2012 21:45:39 Europe/London] PHP Warning: max() [function.max]: When only one parameter is given, it must be an array in /home/bears498/public_html/wxsim/wxall.lastret.php on line 236
[28-Dec-2012 21:45:39 Europe/London] PHP Warning: max() [function.max]: When only one parameter is given, it must be an array in /home/bears498/public_html/wxsim/wxall.lastret.php on line 249
[28-Dec-2012 21:45:39 Europe/London] PHP Warning: max() [function.max]: When only one parameter is given, it must be an array in /home/bears498/public_html/wxsim/wxall.lastret.php on line 250
[

This relates to the following

$windgst1[$r1-2] = max($wgsts1); (line 210)
$uv1[$r1-2] = max($uvs1); (line 212)
$cover1 = max($covers1); (line 225)
$kiw1= max($kiws1); (line 236)
$cov1[$r1-2] = max($covers1); (line 249)
$con1[$r1-2] = max($kiws1); (line250)

I have tried everything to correct this - even complete re-install of the script. I’ve checked the settings in WRET, but can not see anything wrong.

Any ideas would be greatly appreciated.

Page can be seen at http://www.bearsbythesea.co.uk/detailed_forecast.html

Thanks

THe script is a very complex one.
So the question really is: Is the output correct?

If yes, set the error/warning level to errors only.

The output you showed only contains warnings to the programmer.
Programming errors occur, but warnings you can suppress and use the script happily thereafter.

Wim

Hi guys, set at top of first script this

<?php ini_set('display_errors', '0'); ?>

and the errors will be gone from showing up :wink:

They are errors due to some missing checks before looking for max-values…

// Henkka

Hi All,

I added this :-

<?php ini_set('display_errors', '0'); ?>

to every php scripts used by wxall and I’m still getting hundreds of lines like this each time the page is loaded :-

[04-Jan-2013 08:35:14 Europe/London] PHP Warning: reset() expects parameter 1 to be array, null given in /home/ruralter/public_html/dugglenet.org/wxsim/wxsim_wxall/wxall.lastret.php on line 379
[04-Jan-2013 08:35:14 Europe/London] PHP Warning: Invalid argument supplied for foreach() in /home/ruralter/public_html/dugglenet.org/wxsim/wxsim_wxall/wxall.lastret.php on line 380

Any other suggestions please ?

Kind Regards, Simon

I also have display errors set to zero.

Warnings are not showing on the webpage but being added to an error_log.txt file on the server. This is obviously growing in size with every page load.

How do I stop this error_log being generated.

Sent from my GT-I9300 using Tapatalk 2