From c39174980cd78bb6e44a273696dc886c141ac14e Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 9 May 2022 15:34:22 +0200 Subject: [PATCH] Fixed function _getSTGLMailAddress to return same array structure Different structure was causing errors in handling. --- application/controllers/jobs/AnrechnungJob.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php index f32a8268a..4c341af50 100644 --- a/application/controllers/jobs/AnrechnungJob.php +++ b/application/controllers/jobs/AnrechnungJob.php @@ -358,8 +358,6 @@ html; 'vorname' => $stgl->vorname ); } - - return $stglMailAdress_arr; } // If not available, get assistance mail address else @@ -368,12 +366,13 @@ html; if (hasData($result)) { - return array( - $result->retval[0]->email, - '' + $stglMailAdress_arr[]= array( + 'to' => $result->retval[0]->email, + 'vorname' => '' ); } } + return $stglMailAdress_arr; } // Build HTML table with yesterdays new Anrechnungen of the given STG