Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Cumulus ‘Current Conditions’ Alternative v3.0
Moderator: daj
- JennyLeez
- Posts: 336
- Joined: Wed 16 Dec 2009 2:32 am
- Weather Station: La Crosse WS3083
- Operating System: Windows XP, Win7 & Win 10
- Location: Wairoa, Hawkes Bay. New Zealand.
- Contact:
Re: Cumulus ‘Current Conditions’ Alternative v3.0
Hi Ise-cumulus
Thank you for your answer.
I altered my copy and uploaded it but it has not removed the error message for both those lines scrolling across the top of my index page.
Please have you another idea?
Thank you
Cheers
Jenny
Thank you for your answer.
I altered my copy and uploaded it but it has not removed the error message for both those lines scrolling across the top of my index page.
Please have you another idea?
Thank you
Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/

http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
- lse-cumulus
- Posts: 102
- Joined: Mon 11 Jul 2022 3:39 am
- Weather Station: Fine Offset Ecowitt
- Operating System: Windows 11
- Location: Austria
- Contact:
Re: Cumulus ‘Current Conditions’ Alternative v3.0 [Implicit incompatible float to int conversion is deprecated]
Hi Jenny,
unfortunately I could not test/verify by myself as I do not have a PHP 8.1.x environment (under PHP 5.3.x both the old and new code works), but from my understanding it should work.
I can offer the follwing additional ideas:
My PHP 5.3.x test environment: After seeing your post I integrated the curconditions.php scripts from 2014 (I was not aware of so far) into my PWS site
https://leonas.ddns.net/Wetterstation.S ... .Admin.txt
https://leonas.ddns.net/Wetterstation.S ... bretti.php
unfortunately I could not test/verify by myself as I do not have a PHP 8.1.x environment (under PHP 5.3.x both the old and new code works), but from my understanding it should work.
I can offer the follwing additional ideas:
- There are two more lines with array [ float] and maybe now these lines raise the messages. So these should be adapted too.
- add some more brackets () to be on save side.
Code: Select all
// leo: avoid PHP 8.1.x deprecated messages by using typecast (int) based on https://php.watch/versions/8.1/deprecate-implicit-conversion-incompatible-float-string
if($display['showWindDirVerbose']){
$auto .= $langWindVerbose[ ((int) (round(($avgbearing +11) / 22.5 % 16)))];
$hybrid .= $langWindVerbose[ ((int) (round(($avgbearing +11) / 22.5 % 16)))];
} else {
$auto .= $langWindShort[ ((int) (round(($avgbearing +11) / 22.5 % 16)))];
$hybrid .= $langWindShort[ ((int) (round(($avgbearing +11) / 22.5 % 16)))];
}
- If that also does not help, then replace the round () function by the floor () function that does not round to a float but returns the nearest integer that is smaller than the floating number. Tested also under PHP 5.3.x and worked fine.
Code: Select all
// leo: replace round () by floor ()
if($display['showWindDirVerbose']){
$auto .= $langWindVerbose[ ( (floor(($avgbearing +11) / 22.5 % 16)))];
$hybrid .= $langWindVerbose[ ( (floor(($avgbearing +11) / 22.5 % 16)))];
} else {
$auto .= $langWindShort[ ( (floor(($avgbearing +11) / 22.5 % 16)))];
$hybrid .= $langWindShort[ ( (floor (($avgbearing +11) / 22.5 % 16)))];
}
https://leonas.ddns.net/Wetterstation.S ... .Admin.txt
https://leonas.ddns.net/Wetterstation.S ... bretti.php
Leo
Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html

Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html
- JennyLeez
- Posts: 336
- Joined: Wed 16 Dec 2009 2:32 am
- Weather Station: La Crosse WS3083
- Operating System: Windows XP, Win7 & Win 10
- Location: Wairoa, Hawkes Bay. New Zealand.
- Contact:
Re: Cumulus ‘Current Conditions’ Alternative v3.0
Hi Leo,
Yes its a cool wee script. 3 months work by beteljuice. It started with a few bits of data that I wanted to be able to display and slowly increased in size and capability. The admin bit was added later but a very useful adon.
Alas I wish I had better news but using either of those ideas still brings back the same error message.
It is working fine in php8 but as as soon as I change to 8.1.31 it bails out.
My server has given me 2 weeks to sort and then I will not be able to go back to php8 as I am now.
I am hoping you will still have some other ideas.
Thank you, I appreciate your time with this
Cheers
Jenny
Yes its a cool wee script. 3 months work by beteljuice. It started with a few bits of data that I wanted to be able to display and slowly increased in size and capability. The admin bit was added later but a very useful adon.
Alas I wish I had better news but using either of those ideas still brings back the same error message.
It is working fine in php8 but as as soon as I change to 8.1.31 it bails out.
My server has given me 2 weeks to sort and then I will not be able to go back to php8 as I am now.
Code: Select all
Deprecated: Implicit conversion from float 0.7111111111111111 to int loses precision in /xxxxxxxxxxx/web/wairoa.net/weather/curconditions.php on line 477Thank you, I appreciate your time with this
Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/

http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
- lse-cumulus
- Posts: 102
- Joined: Mon 11 Jul 2022 3:39 am
- Weather Station: Fine Offset Ecowitt
- Operating System: Windows 11
- Location: Austria
- Contact:
Re: Cumulus ‘Current Conditions’ Alternative v3.0
Hi Jenny,
You already answered one of my questions: you swtich between PHP8.0 (script working) and PHP8.1.x (not working). So that fits: the php deprecation is exactly introduced with 8.1.x as the PHP release notes announce.
As I am not willing to give up (yet), some more ideas:
After checking PHP manual again in more detail: my floor () solution was incorrect. Floor () does not convert float to integer but returns still float. Therefore also the floor () solution requires a typecast with (int) floor () and then we can stick also with (int) round ().
I suggest we stick with ONE of the modified code:
Does this modified code work fine in php8.0 first, and then you switch to php 8.1 the message appears? Can you keep the modified code in your site (as it is working fine under php8)?
Are we sure that the modified code is active? Can you add some additional code line that shifts the line number or echos a comment, like:
We could check that out, by using context menu in browser (right moude, view source) or ctrl-U (when using chrome).
I assume you just test with the standard curconditions.php functionality and not with admin modifier when it occurs.
So when modified code is really active the next idea is that it might be another code line that is causing the deprecated message and I am looking into the wrong place.
And last not least I could try to debug your code in my development area by installing a php 8.1 version (at least temporarily or in parallel).
For the last two ideas I would need the php8.1 error message(s) with exact line number when using the modified code and your modified code (the curconditions.php script should be enough). Are you willing to send me a zip (please change the following line but keep it, and keep the rest as it is when error message appears).
You already answered one of my questions: you swtich between PHP8.0 (script working) and PHP8.1.x (not working). So that fits: the php deprecation is exactly introduced with 8.1.x as the PHP release notes announce.
As I am not willing to give up (yet), some more ideas:
After checking PHP manual again in more detail: my floor () solution was incorrect. Floor () does not convert float to integer but returns still float. Therefore also the floor () solution requires a typecast with (int) floor () and then we can stick also with (int) round ().
I suggest we stick with ONE of the modified code:
Code: Select all
if($display['showWindDirVerbose']){
$auto .= $langWindVerbose[ (int) (round(($avgbearing +11) / 22.5 % 16))];
$hybrid .= $langWindVerbose[ (int) (round(($avgbearing +11) / 22.5 % 16))];
} else {
$auto .= $langWindShort[ (int) (round(($avgbearing +11) / 22.5 % 16))];
$hybrid .= $langWindShort[ (int) (round(($avgbearing +11) / 22.5 % 16))];
}
Are we sure that the modified code is active? Can you add some additional code line that shifts the line number or echos a comment, like:
Code: Select all
echo "<!-- modified-deprecated -->\n";
I assume you just test with the standard curconditions.php functionality and not with admin modifier when it occurs.
So when modified code is really active the next idea is that it might be another code line that is causing the deprecated message and I am looking into the wrong place.
And last not least I could try to debug your code in my development area by installing a php 8.1 version (at least temporarily or in parallel).
For the last two ideas I would need the php8.1 error message(s) with exact line number when using the modified code and your modified code (the curconditions.php script should be enough). Are you willing to send me a zip (please change the following line but keep it, and keep the rest as it is when error message appears).
Code: Select all
$mypass = "XXXXX";
Leo
Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html

Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html
- JennyLeez
- Posts: 336
- Joined: Wed 16 Dec 2009 2:32 am
- Weather Station: La Crosse WS3083
- Operating System: Windows XP, Win7 & Win 10
- Location: Wairoa, Hawkes Bay. New Zealand.
- Contact:
Re: Cumulus ‘Current Conditions’ Alternative v3.0
Hi Leo,
Firstly I really appreciate this help. This was all written by beteljuice from scratch and since I have lost my friend I have also lost the ability to maintain these scripts with precious little knowledge of php. My site has by and large been written in basic html.
Please know you are free to change anything to have this functioning as I have no doubt there will be other members who are going to end up with this error when forced, like myself, into php 8.1.31.
That said..............
I had left it with the last code you gave me. The floor () solution.
Yes correct it works in 8.0 but when I switch to 8.1.31 the error message appears so I switch it back.
Yes it is active as when you added
It pushed the error messages down 1 line.
I have added the
and now the 2 error messages have pushed down 2 lines to 478 & 479
I do not use the admin modification very often. The script is usually right so no not using.
I will zip my curconditions.php up and message you.
You are 10 hours behind me by my calculations. I am 10pm and I will leave my site on 8.1.31 for the night. The error message shows up at the top but hidden with my dark background. Run you mouse across the top rows above the main frame and it will highlight.
Off to zip now.
Thank you heaps,
Cheers
Jenny
P.S. A tad cold up your way
Firstly I really appreciate this help. This was all written by beteljuice from scratch and since I have lost my friend I have also lost the ability to maintain these scripts with precious little knowledge of php. My site has by and large been written in basic html.
Please know you are free to change anything to have this functioning as I have no doubt there will be other members who are going to end up with this error when forced, like myself, into php 8.1.31.
That said..............
I had left it with the last code you gave me. The floor () solution.
Yes correct it works in 8.0 but when I switch to 8.1.31 the error message appears so I switch it back.
Yes it is active as when you added
Code: Select all
// leo: replace round () by floor ()I have added the
Code: Select all
echo "<!-- modified-deprecated -->\n";I do not use the admin modification very often. The script is usually right so no not using.
I will zip my curconditions.php up and message you.
You are 10 hours behind me by my calculations. I am 10pm and I will leave my site on 8.1.31 for the night. The error message shows up at the top but hidden with my dark background. Run you mouse across the top rows above the main frame and it will highlight.
Off to zip now.
Thank you heaps,
Cheers
Jenny
P.S. A tad cold up your way
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/

http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
- lse-cumulus
- Posts: 102
- Joined: Mon 11 Jul 2022 3:39 am
- Weather Station: Fine Offset Ecowitt
- Operating System: Windows 11
- Location: Austria
- Contact:
Re: curconditions.php php 8.1.31 deprecation [FIXED]
Hi Jenny,
Old deprecated code that needs to be replaced:
- I installed PHP 8.1.31 and xdebug in my development environment and debuged the code, and I found a solution. No need to send me your version of the code.
- All my previous solutions really did not work under php 8.1.31 and still generated the deprecated message (shame on me for doubting that the code might not have been activated on your site).
- the modulo % operation caused the deprecation and I isolated that in the following code. Tested under PHP 5.3 and 8.1 and works fine in both versions. So please replace the following code part by the new part.
Code: Select all
// describe wind
if($display['showWind']){
$auto .= $beaudesc;
$hybrid .= $beaudesc;
if($display['showWindDir']){
if($beaufortnumber > 0){
$auto .= $langCurrWeather["from"];
$hybrid .= $langCurrWeather["from"];
if($debug) echo "<!-- modified-deprecated-code-for-php8.1 -->\n";
$arraykeyfloat = ($avgbearing + 11) / 22.5;
$arraykeyint = (int) $arraykeyfloat % 16;
if($display['showWindDirVerbose']){
$auto .= $langWindVerbose[$arraykeyint];
$hybrid .= $langWindVerbose[$arraykeyint];
} else {
$auto .= $langWindShort[$arraykeyint];
$hybrid .= $langWindShort[$arraykeyint];
}
}
}
} // END wind
Code: Select all
// describe wind
if($display['showWind']){
$auto .= $beaudesc;
$hybrid .= $beaudesc;
if($display['showWindDir']){
if($beaufortnumber > 0){
$auto .= $langCurrWeather["from"];
$hybrid .= $langCurrWeather["from"];
if($display['showWindDirVerbose']){
$auto .= $langWindVerbose[ round(($avgbearing +11) / 22.5 % 16)];
$hybrid .= $langWindVerbose[ round(($avgbearing +11) / 22.5 % 16)];
} else {
$auto .= $langWindShort[ round(($avgbearing +11) / 22.5 % 16)];
$hybrid .= $langWindShort[ round(($avgbearing +11) / 22.5 % 16)];
}
}
}
} // END wind
Leo
Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html

Ecowitt GW2000/WS90/Wittboy/GW1000/WS2910/WH65/WH31/WH34S/WH41/WH45/WH51/WH57/HP10/WN35/LDS01
AWEKAS/CWOP/PWS/Weathercloud/Windy/WOW/WU/WxSim/CMX/CU
https://leonas.ddns.net/index.html
- JennyLeez
- Posts: 336
- Joined: Wed 16 Dec 2009 2:32 am
- Weather Station: La Crosse WS3083
- Operating System: Windows XP, Win7 & Win 10
- Location: Wairoa, Hawkes Bay. New Zealand.
- Contact:
Re: Cumulus ‘Current Conditions’ Alternative v3.0
Brilliant 
Thank you heaps.
I have also uploaded this fix as version 3.1 if needed.
At least now I can leave the 8.1 running while I check through the rest of my site.
Many many thanks Leo.
Cheers
Jenny
Thank you heaps.
I have also uploaded this fix as version 3.1 if needed.
At least now I can leave the 8.1 running while I check through the rest of my site.
Many many thanks Leo.
Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/

http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
-
water01
- Posts: 3669
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10/11 64bit Synology NAS
- Location: Burnham-on-Sea
- Contact:
Re: Cumulus ‘Current Conditions’ Alternative v3.0
Yes thank you Leo, your examples allowed me to fix quite a few problems in other code.
Many thanks.
Many thanks.