fix a bug in surveys : a 0 answer was not possible in multiple choices questions
authorx2004laborde <x2004laborde@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 1 May 2007 16:41:42 +0000 (16:41 +0000)
committerx2004laborde <x2004laborde@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 1 May 2007 16:41:42 +0000 (16:41 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1788 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/survey/survey.inc.php

index 02ccef6..39047af 100644 (file)
@@ -606,7 +606,7 @@ abstract class SurveyList extends SurveyQuestion
         parent::update($args);
         $this->choices = array();
         foreach ($args['options'] as $val) {
-            if (trim($val)) {
+            if (trim($val) || trim($val) == '0') {
                 $this->choices[] = $val;
             }
         }