From 6f8e971673f883a996c97d6b8918e23c5a52ff71 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 16 Nov 2020 10:43:25 +0200 Subject: [PATCH] Ensure working plan exceptions will not be NULL before being used (#926). --- application/models/Providers_model.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/application/models/Providers_model.php b/application/models/Providers_model.php index dfd4bb3f..18eaf95c 100755 --- a/application/models/Providers_model.php +++ b/application/models/Providers_model.php @@ -332,7 +332,14 @@ class Providers_model extends EA_Model { if ($name === 'working_plan_exceptions') { $value = json_decode($value, TRUE); + + if (!$value) + { + $value = []; + } + krsort($value); + $value = json_encode($value); }