diff --git a/application/models/Providers_model.php b/application/models/Providers_model.php index 4a9eb1b1..b3ff051e 100755 --- a/application/models/Providers_model.php +++ b/application/models/Providers_model.php @@ -524,6 +524,13 @@ class Providers_model extends EA_Model array $working_plan_exception = null, ): void { // Validate the working plan exception data. + + if (empty($working_plan_exception['start']) || empty($working_plan_exception['end'])) { + throw new InvalidArgumentException( + 'Empty start and/or end time provided: ' . json_encode($working_plan_exception), + ); + } + $start = date('H:i', strtotime($working_plan_exception['start'])); $end = date('H:i', strtotime($working_plan_exception['end']));