Ensure working plan exceptions will not be NULL before being used (#926).
This commit is contained in:
parent
a48324be08
commit
6f8e971673
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue