[Fusionforge-commits] FusionForge branch Branch_5_2 updated. 63c9580e2fe06dc4bbd2dfa000f26fc71d077dba

Roland Mas lolando at fusionforge.org
Thu Aug 29 16:07:58 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_2 has been updated
       via  63c9580e2fe06dc4bbd2dfa000f26fc71d077dba (commit)
      from  8367ee4c252a4db6d93431c5d889dec511ad194e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 63c9580e2fe06dc4bbd2dfa000f26fc71d077dba
Author: Roland Mas <lolando at debian.org>
Date:   Thu Aug 29 16:07:48 2013 +0200

    Avoid PHP warning when retrieving empty list of questions

diff --git a/src/common/survey/SurveyQuestionFactory.class.php b/src/common/survey/SurveyQuestionFactory.class.php
index ee3c236..c480f65 100644
--- a/src/common/survey/SurveyQuestionFactory.class.php
+++ b/src/common/survey/SurveyQuestionFactory.class.php
@@ -89,6 +89,7 @@ class SurveyQuestionFactory extends Error {
 		}
 
 		$group_id = $this->Group->GetID();
+		$this->questions = array();
 		$result = db_query_params ('SELECT survey_questions.*,survey_question_types.type
 			FROM survey_questions,survey_question_types
 			WHERE survey_question_types.id=survey_questions.question_type
@@ -96,10 +97,7 @@ class SurveyQuestionFactory extends Error {
 			ORDER BY survey_questions.question_id ASC',
 					   array ($group_id));
 
-		if (!$result) {
-			$this->setError(_('No Survey Question is found').db_error());
-			return false;
-		} else {
+		if ($result) {
 			while ($arr = db_fetch_array($result)) {
 				$this->questions[] = new SurveyQuestion($this->Group, $arr['question_id'], $arr);
 			}

-----------------------------------------------------------------------

Summary of changes:
 src/common/survey/SurveyQuestionFactory.class.php |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list