Fix Validation

This commit is contained in:
Alex Tselegidis 2024-03-18 11:54:08 +00:00
parent e527d13899
commit da6d017ff1

View file

@ -107,8 +107,8 @@ class Secretaries_model extends EA_Model
// Validate secretary providers. // Validate secretary providers.
if (!empty($secretary['providers'])) { if (!empty($secretary['providers'])) {
// Make sure the provided provider entries are numeric values. // Make sure the provided provider entries are numeric values.
foreach ($secretary['providers'] as $secretary_id) { foreach ($secretary['providers'] as $provider_id) {
if (!is_numeric($secretary_id)) { if (!is_numeric($provider_id)) {
throw new InvalidArgumentException( throw new InvalidArgumentException(
'The provided secretary providers are invalid: ' . print_r($secretary, true), 'The provided secretary providers are invalid: ' . print_r($secretary, true),
); );