From a30942cd2b33087e3c3696fa18d84c4020cbf36c Mon Sep 17 00:00:00 2001 From: Walderlan Sena Date: Mon, 18 Mar 2019 00:51:33 -0300 Subject: [PATCH] hotfix: Fixed return error in path in payment record --- src/Exceptions/Error.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Exceptions/Error.php b/src/Exceptions/Error.php index d80738c..fe492cb 100644 --- a/src/Exceptions/Error.php +++ b/src/Exceptions/Error.php @@ -88,6 +88,9 @@ public static function parseErrors($json_string) $errors = []; if (!empty($error_obj->errors)) { foreach ($error_obj->errors as $error) { + if (!isset($error->path)) { + $error->path = ''; + } $errors[] = new self($error->code, $error->path, $error->description); } } elseif (!empty($error_obj->error)) {