mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Enhancement of method _validate of controller Person
This commit is contained in:
@@ -123,7 +123,10 @@ class Person extends APIv1_Controller
|
||||
// Trim all the values
|
||||
foreach($person as $key => $value)
|
||||
{
|
||||
$person[$key] = trim($value);
|
||||
if (gettype($value) == 'string')
|
||||
{
|
||||
$person[$key] = trim($value);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($person['sprache']) && mb_strlen($person['sprache']) > 16)
|
||||
@@ -182,7 +185,7 @@ class Person extends APIv1_Controller
|
||||
{
|
||||
return error('Anzahl der Kinder ist ungueltig');
|
||||
}
|
||||
if (!isset($person['aktiv']) || (isset($person['aktiv']) && $person['aktiv'] !== 'true' && $person['aktiv'] !== 'false'))
|
||||
if (!isset($person['aktiv']) || (isset($person['aktiv']) && $person['aktiv'] !== true && $person['aktiv'] !== false))
|
||||
{
|
||||
return error('Aktiv ist ungueltig');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user