From 0143fd11acdbf9222950d50d2747d35fbe7ea11e Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Fri, 25 Apr 2025 19:41:42 -0400 Subject: [PATCH] Se pasan datos a EmptyResult en base- --- app/common/Ideal/Repository.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/common/Ideal/Repository.php b/app/common/Ideal/Repository.php index 9a46692..c8afff6 100644 --- a/app/common/Ideal/Repository.php +++ b/app/common/Ideal/Repository.php @@ -189,7 +189,7 @@ abstract class Repository implements Define\Repository try { $this->connection->execute($query, $values); } catch (PDOException $exception) { - throw new EmptyResult($query, $exception); + throw new EmptyResult($query, $exception, $data); } return $this->fetchById($this->getIndex($model)); } @@ -205,10 +205,10 @@ abstract class Repository implements Define\Repository try { $result = $this->connection->execute($query, $data)->fetch(PDO::FETCH_ASSOC); if ($result === false) { - throw new EmptyResult($query); + throw new EmptyResult($query, null, $data); } } catch (PDOException $exception) { - throw new EmptyResult($query, $exception); + throw new EmptyResult($query, $exception, $data); } return $this->load($result); } @@ -224,7 +224,7 @@ abstract class Repository implements Define\Repository try { $results = $this->connection->execute($query, $data)->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $exception) { - throw new EmptyResult($query, $exception); + throw new EmptyResult($query, $exception, $data); } return array_map([$this, 'load'], $results); } @@ -240,7 +240,7 @@ abstract class Repository implements Define\Repository try { $results = $this->connection->execute($query, $data)->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $exception) { - throw new EmptyResult($query, $exception); + throw new EmptyResult($query, $exception, $data); } return $results; }