Were you able to find a fix for this script?
There is no "fix" needed. The script already works without problems with PHP 8.x.
The errors are caused by missing fields.
In your script the lines 44-48 read:
<div id="main-copy">
<?php
?><!-- WXSOIL START -->
I added all used fields with some values as I do not have those sensors in my test-files.
<div id="main-copy">
<?php
# for test
$soiltemp = 10;
$soiltemp2 = 20;
$VPsoilmoisture = 11;
$VPsoilmoisture2 = 21;
$yrecordhighsoil = 30;
$yrecordlowsoil = 0;
$VPsoiltemp2 = $yrecordhighsoilmonth = $yrecordlowsoilmonth = $yrecordhighsoilday = $yrecordlowsoilday =
$yrecordhighsoil2 = $yrecordlowsoil2 = $yrecordhighsoilmonth = $yrecordlowsoilmonth2 = $yrecordhighsoilday2 =
$yrecordlowsoilday2 = $yrecordhighsoilmonth2 = $recordhighsoil = $recordlowsoil = $recordhighsoilmonth =
$recordhighsoilday =
$recordlowsoilmonth = $recordhighsoilyear = $recordlowsoilday = $recordlowsoilyear = $recordhighsoil2 =
$recordlowsoil2 = $recordhighsoilmonth2 = $recordlowsoilmonth2 = $recordhighsoilday2 = $recordlowsoilday2 =
$recordhighsoilyear2 = $recordlowsoilyear2 =
44;
$avtempjannowsoil = $avtempfebnowsoil = $avtempmarnowsoil = $avtempaprnowsoil = $avtempmaynowsoil = $avtempjunnowsoil =
$avtempjulnowsoil = $avtempaugnowsoil = $avtempsepnowsoil = $avtempoctnowsoil = $avtempnovnowsoil = $avtempdecnowsoil =
55;
?><!-- WXSOIL START -->
The script works without errors if the fields used exist. See attached screenshot.
Maybe there is a separate file for those soil-values, or another version of testtags.php is needed.
Regards,
Wim