Error message with own OFP

Good day

We recently got this error message in our OFP. Can you do anything with it?

Fatal error : Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, SimpleXMLElement given in /home/swrepub/www/Edelweiss_intranet/ofp/OFP.php:583 Stack trace: #0 /home/swrepub/www/Edelweiss_intranet/ofp/OFP.php(583): abs(Object(SimpleXMLElement)) #1 {main} thrown in /home/swrepub/www/Edelweiss_intranet/ofp/OFP.php on line 583

Direct link our OFP

Thats the code:

<td colspan="3" height=55>-1FL STEP <?php echo $flight->impacts->minus_2000ft->burn_difference;?>KG/-<?php echo gmdate('.i', abs($flight->impacts->minus_2000ft->time_difference));?></td>

Hi, maybe you need to account for the possibility that $flight->impacts->minus_2000ft->burn_difference is not set (for example, when forcing a custom altitude that’s above the maximum altitude at the planned weight).

The following could work (untested):

<td colspan="3" height=55>-1FL STEP <?php echo (isset($flight->impacts->minus_2000ft->burn_difference) ? $flight->impacts->minus_2000ft->burn_difference : '0');?>KG/-<?php echo gmdate('.i', (isset($flight->impacts->minus_2000ft->time_difference) ? abs($flight->impacts->minus_2000ft->time_difference) : 0));?></td>

Best regards,