From 34a239a823ffdea8b6dac04b5471d0e0bcb74179 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 13 Aug 2025 14:54:43 +0200 Subject: [PATCH] Set Foto to null instead of empty String when Deleted --- application/controllers/api/frontend/v1/stv/Student.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/controllers/api/frontend/v1/stv/Student.php b/application/controllers/api/frontend/v1/stv/Student.php index ac09f39bb..70970d8b5 100644 --- a/application/controllers/api/frontend/v1/stv/Student.php +++ b/application/controllers/api/frontend/v1/stv/Student.php @@ -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'];