diff --git a/CHANGELOG.md b/CHANGELOG.md index bac202b..9b89657 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # CHANGELOG +## v 2.0.2 06/10/2017 + * Fix encoding mensaje error en respuesta ## v 2.0.1 16/05/2017 * Vuelve version para PHP 5.6 a 7+ diff --git a/src/SIUToba/rest/http/vista_json.php b/src/SIUToba/rest/http/vista_json.php index bef9377..f9e68d6 100644 --- a/src/SIUToba/rest/http/vista_json.php +++ b/src/SIUToba/rest/http/vista_json.php @@ -14,7 +14,7 @@ protected function get_content_type() public function get_cuerpo() { $data = $this->respuesta->get_data(); - if (!empty($data) && $this->respuesta->get_encoding_datos() !== 'utf-8') { + if (!empty($data)) { $data = $this->utf8_encode_fields($data); } @@ -102,7 +102,6 @@ protected function utf8_encode_fields(array $elements) $elements[$key] = utf8_encode($elements[$key]); } } - return $elements; } } diff --git a/src/SIUToba/rest/rest.php b/src/SIUToba/rest/rest.php index 89f116d..3db1414 100644 --- a/src/SIUToba/rest/rest.php +++ b/src/SIUToba/rest/rest.php @@ -256,6 +256,7 @@ public function procesar() $ex->configurar_respuesta($this->response); $this->logger->info("Excepcion de Autenticacion. Autenticar y reintentar"); $this->logger->info(var_export($this->response, true)); + $this->logger->info($ex->getMessage()); } catch (rest_error_autorizacion $ex) { $ex->configurar_respuesta($this->response); $this->logger->info("Error de Autorizacion.");