Skip to content

Commit

Permalink
[Candidate.class.inc] Allow null Sex for scanner candidates (#7058)
Browse files Browse the repository at this point in the history
Fix bug where PHP class could not handle null Sex value for scanner candidates.
  • Loading branch information
CamilleBeau authored Jul 13, 2021
1 parent d8e95ca commit 92e70d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/libraries/Candidate.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Candidate implements \LORIS\StudyEntities\AccessibleResource,
foreach ($row as $key=>$value) {
switch ($key){
case 'Sex':
$this->candidateInfo[$key] = new Sex($value);
$this->candidateInfo[$key] = empty($value) ? null : new Sex($value);
break;
case 'Entity_type':
$this->candidateInfo[$key] = new EntityType($value);
Expand Down

0 comments on commit 92e70d0

Please sign in to comment.