From 3d1a980f2df71569baec113008c35d281872ed9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 2 Jan 2014 15:49:49 +0100 Subject: [PATCH] Logging error when no poll was found in opensurveysondage.class.php --- htdocs/opensurvey/class/opensurveysondage.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index cde370edd03..b0895e466f4 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos GarcĂ­a * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -229,7 +230,13 @@ class Opensurveysondage extends CommonObject $this->date_m = $this->db->jdate($obj->tls); $ret=1; } - else $ret=0; + else + { + $sondage = ($id ? 'id='.$id : 'sondageid='.$numsurvey); + $this->error='Fetch no poll found for '.$sondage; + dol_syslog($this->error, LOG_ERR); + $ret = 0; + } $this->db->free($resql); }