From 10e41f3a99d0cb5963528ad118a0a694543bacb1 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Fri, 28 Dec 2012 10:29:46 +0100 Subject: [PATCH] log more info on query failed --- core/lib/Thelia/Database/NotORM/Result.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Database/NotORM/Result.php b/core/lib/Thelia/Database/NotORM/Result.php index 3fe5e7d9b..aa1cbb9d7 100644 --- a/core/lib/Thelia/Database/NotORM/Result.php +++ b/core/lib/Thelia/Database/NotORM/Result.php @@ -31,8 +31,9 @@ class Result extends \NotORM_Result $return = $this->notORM->connection->prepare($query); if (!$return || !$return->execute(array_map(array($this, 'formatValue'), $parameters))) { $this->notORM->logger->fatal("Error for this query : ".$query); - $this->notORM->logger->fatal($this->notORM->errorCode); - $this->notORM->logger->fatal($this->notORM->errorInfo); + $this->notORM->logger->fatal($this->notORM->errorCode()); + $this->notORM->logger->fatal(print_r($this->notORM->errorInfo(), true)); + $this->notORM->logger->fatal(print_r($return->errorInfo(), true)); return false; } return $return;