From 45fed547c98ab15b030152d36a66b83d52b82957 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 7 May 2013 23:59:05 +0000 Subject: [PATCH] Throw an exception if trying to use $this->date_format and date_format is not defined --- include/class_phpcompta_sql.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/class_phpcompta_sql.php b/include/class_phpcompta_sql.php index 9db2c74b4..2f86de007 100644 --- a/include/class_phpcompta_sql.php +++ b/include/class_phpcompta_sql.php @@ -135,6 +135,7 @@ class phpcompta_sql switch ($this->type[$value]) { case "date": + if ($this->date_format=="") throw new Exception('Format Date invalide'); $par .=$sep. 'to_date($' . $idx . ",'" . $this->date_format . "')" ; break; default: