Set Foto to null instead of empty String when Deleted

This commit is contained in:
ma0068
2025-08-13 14:54:43 +02:00
parent 5e7514ffff
commit 34a239a823
@@ -276,9 +276,14 @@ class Student extends FHCAPI_Controller
$update_person = array();
foreach ($array_allowed_props_person as $prop) {
$val = $this->input->post($prop);
if ($val !== null) {
if ($val !== null)
{
$update_person[$prop] = $val;
}
if($prop == 'foto' && $val == '')
{
$update_person[$prop] = null;
}
}
$array_allowed_props_student = ['matrikelnr'];