Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

get-USNO-sunmoon.php error

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
Sadgit
Posts: 111
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

get-USNO-sunmoon.php error

Post by Sadgit » Sat 28 Jul 2018 11:07 am

Hello

I updated the templates as described in another thread and now I get the following errors.. any ideas please?
Warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/weather/get-USNO-sunmoon.php on line 360

Warning: Invalid argument supplied for foreach() in /home/xxxxx/public_html/weather/get-USNO-sunmoon.php on line 371

360
foreach($MoonJSON['sundata'] as $n => $d) {
371
foreach($MoonJSON['moondata'] as $n => $d) {


Cheers
Mark

User avatar
ConligWX
Posts: 734
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.5 Stretch
Location: Bangor, NI
Contact:

Re: get-USNO-sunmoon.php error

Post by ConligWX » Sat 28 Jul 2018 1:52 pm

are you running PHP 7.x?

you also are running an older version of the get-USNO-sunmoon.php

http://www.marton-weather.co.uk/check-f ... w=versions.

Code: Select all

	//  Version 3.00 - 11-Oct-2017 - use cURL for fetch, provide bypass/calculations for api.usno.navy.mil outages
	//  Version 3.01 - 20-Oct-2017 - fix date format for calculated date functions
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2 Plus - Meteobrige Nano SD + Saratoga/PWS Templates

Sadgit
Posts: 111
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: get-USNO-sunmoon.php error

Post by Sadgit » Sun 29 Jul 2018 1:17 pm

I need to check on the php version.. but I went back to an old version of the file due to the errors

Post Reply