From 6c44a62f3654b6d02523d35a2fecdc8bd5220572 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Fri, 29 Sep 2017 13:17:40 +0200 Subject: [PATCH] Item of result - setting values - make stronger comparison for boolean values --- src/Result/Item/Participant.php | 8 ++++---- src/Result/Item/QuestionShort.php | 4 ++-- src/Result/Item/Survey.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Result/Item/Participant.php b/src/Result/Item/Participant.php index 44e6e80..29beae7 100644 --- a/src/Result/Item/Participant.php +++ b/src/Result/Item/Participant.php @@ -183,15 +183,15 @@ class Participant extends BaseItem break; case 'blacklisted': - $this->blacklisted = 'Y' === trim($value); + $this->blacklisted = 'Y' === trim(strtoupper($value)); break; case 'sent': - $this->sent = 'Y' === trim($value); + $this->sent = 'Y' === trim(strtoupper($value)); break; case 'remindersent': - $this->reminderSent = 'Y' === trim($value); + $this->reminderSent = 'Y' === trim(strtoupper($value)); break; case 'remindercount': @@ -199,7 +199,7 @@ class Participant extends BaseItem break; case 'completed': - $this->completed = 'Y' === trim($value); + $this->completed = 'Y' === trim(strtoupper($value)); break; case 'usesleft': diff --git a/src/Result/Item/QuestionShort.php b/src/Result/Item/QuestionShort.php index 1228964..107ded3 100644 --- a/src/Result/Item/QuestionShort.php +++ b/src/Result/Item/QuestionShort.php @@ -193,11 +193,11 @@ class QuestionShort extends BaseItem break; case 'other': - $this->other = 'Y' === trim($value); + $this->other = 'Y' === trim(strtoupper($value)); break; case 'mandatory': - $this->mandatory = 'Y' === trim($value); + $this->mandatory = 'Y' === trim(strtoupper($value)); break; case 'question_order': diff --git a/src/Result/Item/Survey.php b/src/Result/Item/Survey.php index 1dc64e7..0f83073 100644 --- a/src/Result/Item/Survey.php +++ b/src/Result/Item/Survey.php @@ -86,7 +86,7 @@ class Survey extends BaseItem break; case 'active': - $this->active = 'Y' === trim($value); + $this->active = 'Y' === trim(strtoupper($value)); break; } }