Ensure working plan exceptions will not be NULL before being used (#926).

This commit is contained in:
Alex Tselegidis 2020-11-16 10:43:25 +02:00
parent a48324be08
commit 6f8e971673

View file

@ -332,7 +332,14 @@ class Providers_model extends EA_Model {
if ($name === 'working_plan_exceptions') if ($name === 'working_plan_exceptions')
{ {
$value = json_decode($value, TRUE); $value = json_decode($value, TRUE);
if (!$value)
{
$value = [];
}
krsort($value); krsort($value);
$value = json_encode($value); $value = json_encode($value);
} }