From f441696b960b7e02d9ff56468923d92ebb7eae06 Mon Sep 17 00:00:00 2001 From: Jose Pabl Domingo Aramburo Sanchez Date: Mon, 6 Aug 2018 02:11:24 -0600 Subject: [PATCH] [mod] Null last names retured as empty in employee data --- api-payroll/src/application/EmployeeApplication.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api-payroll/src/application/EmployeeApplication.php b/api-payroll/src/application/EmployeeApplication.php index e5a3d41..8964b51 100644 --- a/api-payroll/src/application/EmployeeApplication.php +++ b/api-payroll/src/application/EmployeeApplication.php @@ -222,7 +222,11 @@ class EmployeeApplication{ "idPerson" => (int)$employeeData['idPerson'], "firstName" => $this->cryptographyService->decryptString($employeeData['firstName']), "middleName" => $this->cryptographyService->decryptString($employeeData['middleName']), - "lastName" => $this->cryptographyService->decryptString($employeeData['lastName']), + + "lastName" => strlen($employeeData['lastName']) > 0 + ? $this->cryptographyService->decryptString($employeeData['lastName']) + : '', + "email" => $this->cryptographyService->decryptString($employeeData['email']), "phone" => $employeeData['phone'], "code" => $employeeData['code'],