Alerting template stops working

New alert template from docs, stops work. I use this sensor template:

{{ $alert->title }}

Device Name: {{ $alert->hostname }}
Severity: {{ $alert->severity }} 
Timestamp: {{ $alert->timestamp }}
Uptime: {{ $alert->uptime_short }}
@if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif
Location: {{ $alert->location }}
Description: {{ $alert->description }}
Features: {{ $alert->features }}
Purpose: {{ $alert->purpose }}
Notes: {{ $alert->notes }}

Rule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif
@if ($alert->faults) Faults:
@foreach ($faults as $key => $value)
#{{ $key }}: Temperature: $value['sensor_current']°C
** @php echo ($value['sensor_current']-$value['sensor_limit']); @endphp°C over limit
Previous Measurement: $value['sensor_prev']°C
High Temperature Limit: $value['sensor_limit']°C
@endforeach
@endif

Its works about 5 minute, I recive correct alert, but after some time, I got this:

Warning: Invalid argument supplied for foreach() in /opt/librenms/storage/framework/views/fd4c1d0c7cb0914ba11bad11249989be on line 25

I think this might be related to this Alert problem

Try take out / change that php echo line as a test. Also, i think the lines after should be
{{ $value['sensor_prev'] }} °C and {{ $value['sensor_limit'] }} °C

I try to remove it/change it, and it didn`t help.

Now, when alert triger, I recive only this:

Device Name: 192.168.0.208
Severity: critical 
Timestamp: 2018-08-27 17:04:36
Uptime: 68d 21h 17m 24s
Location: Km, Podolska, 93
Description: 
Features: features is not a valid  data name
Purpose: purpose is not a valid  data name
Notes: 

Rule:  Sensor over limit - Check Device Health Settings  Faults:

I fix it, just use wrong template…