I do not have the desire to “improve” these complex “post-donation-ware-bu-now-for-free” scripts.
These scripts are meant to investigate ones own data.
You yourself know these 31 days are some default-setup problem somewhere.
Do not look at those 31’s, use the script to study your data.
If you find real errors in the data handling post those here and I will spent my time for that.
I’ve found a mystification that seems to be related to PHP 8.0.
I do not watch “Reports at WU” every day.
Now I have discovered that many of the tables show very strange numbers, - see example in screenshot1.
I have as an experiment switched back to PHP 7.4
Then the numbers are displayed correctly, - see screenshot2.
I have a hard time figuring out the path of numbers through “machinery”, and I dare not tinke with anything until I have received an advice.
Now again running PHP 8.0.
I updated to PHP 8 a few months ago and got the same issue as you. Found that the problem was wsReports1part.php, line 425.
I comment the line to get around this.
$empty = ' ';
to
#$empty = ' ';
I’m not a PHP programmer and have no idea what the problem is, but I’m sure there is someone here who can explain this
Nothing to do with PHP version but my Reports just stopped working with the error message shown in report.png, although if I run that line in a browser it works. I also noticed that IEDINBUR98-year-2021.txt had not been updated since 28 September - probably the last time I looked at a report.
But I realised that …pws/chartswudata/IEDINBUR98Y.txt is identical in format, and if I copy that to …wureports/wuData and rename it IEDINBUR98-year-2021.txt everything works (Note that my old graphs run 1/1-31/12, not last 360 days.)
EDIT: So I wrote a script to automate that, and changed the error message to report2.png.
LATER EDIT: automatic copy/rename routine now included in startReports.php, so I should always have a data file.