Permalink
Browse files

MDL-35620 question engine: should distinguish NULL and 0.

This only matters in an obscure edge case, but it is an edge case we hit
with one of the OU question types.

This load data code is processing the results of a LEFT JOIN, so is_null
is the correct logic.
  • Loading branch information...
timhunt committed Sep 25, 2012
1 parent c5575c6 commit db6d764fe282743e4eb92672fe6905fd96316105
Showing with 1 addition and 1 deletion.
  1. +1 −1 question/engine/questionattemptstep.php
@@ -386,7 +386,7 @@ public static function load_from_records($records, $attemptstepid) {
$record = $currentrec;
$data = array();
while ($currentrec && $currentrec->attemptstepid == $attemptstepid) {
- if ($currentrec->name) {
+ if (!is_null($currentrec->name)) {
$data[$currentrec->name] = $currentrec->value;
}
$records->next();

0 comments on commit db6d764

Please sign in to comment.