Meteoalarm ATOM file empty, CAP version works

Hello together

Since about two days I have error messages about advisory block with wrnWarningEU-ATOM.php:

Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, string given in /home/httpd/vhosts/ Stack trace: #0 /home/httpd/vhosts/ include() #1 /home/httpd/vhosts/ include(‘/home/httpd/vho…’) #2 /home/httpd/vhosts/ include(‘/home/httpd/vho…’) #3 {main} thrown in /home/httpd/vhosts/ on line 153

If I use wrnWarningEU-CAP.php there is no error and everything works.

Has somebody any idea ? Thank you very much.


Always post a link to your website.
Makes checking what the problem could be easier.

Hi enpa,

Welcome to the WeatherWatch community.

It is fairly difficult to test without knowing what you are using in your settings.


  • Did the ATOM data for your area worked correctly before?
  • Why do you insist on using ATOM data when the CAP data seems to be available?

The CAP data jsondata/warningCAP.arr is loaded correctly and the scripts seem to work.

The ATOM data jsondata/warningEU2.arr is empty, strange maybe, but I can not test anything without the settings (regional codes) you used

Maybe the complete ATOM data as from Meteoalaram retrieved is or was empty???.

The error in line 153 of wrnWarningEU-ATOM.php can be removed
by changing line 152 from

                       {  $items++;


                       {  if ( !is_array ($entry)  ) { continue;}

That way we catch total empty data.

P.S. There is a POLL about the future of PWS_Dashboard, please vote there


Hello Wim

Thank you very much for your fast reply. The change of the line 152 was the solution, no errors anymore with ATOM. Debug test of advisory_c_small.php: no error, Result:

Morgens Gewitter. Tiefsttemperatur 14C. Wind aus SSO und wechselhaft. Regenrisiko 60 %.

Here are the missing informations you need:

Answers on your questions:

  • The ATOM data for my area worked correctly, without any issue.
  • I have tested the CAP month before, but the result was not as good as with ATOM for me

My regional codes in use:

  • CH162,CH163,CH164,CH143,CH152,CH163,CH161,CH169

With best regards