Loading src/Plugin/WebformScore/Contains.php +3 −4 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\webform_score\Plugin\WebformScore; use Drupal\Component\Utility\Unicode; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\TypedData\TypedDataInterface; use Drupal\webform_score\Plugin\WebformScoreInterface; Loading Loading @@ -35,11 +34,11 @@ class Contains extends WebformScoreBase implements WebformScoreInterface { $answer = $answer->getValue(); $expected = $this->configuration['expected']; if (!$this->configuration['case_sensitive']) { $answer = Unicode::strtolower($answer); $expected = Unicode::strtolower($expected); $answer = mb_strtolower($answer); $expected = mb_strtolower($expected); } return Unicode::strpos($answer, $expected) === FALSE ? 0 : $this->getMaxScore(); return mb_strpos($answer, $expected) === FALSE ? 0 : $this->getMaxScore(); } /** Loading Loading
src/Plugin/WebformScore/Contains.php +3 −4 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\webform_score\Plugin\WebformScore; use Drupal\Component\Utility\Unicode; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\TypedData\TypedDataInterface; use Drupal\webform_score\Plugin\WebformScoreInterface; Loading Loading @@ -35,11 +34,11 @@ class Contains extends WebformScoreBase implements WebformScoreInterface { $answer = $answer->getValue(); $expected = $this->configuration['expected']; if (!$this->configuration['case_sensitive']) { $answer = Unicode::strtolower($answer); $expected = Unicode::strtolower($expected); $answer = mb_strtolower($answer); $expected = mb_strtolower($expected); } return Unicode::strpos($answer, $expected) === FALSE ? 0 : $this->getMaxScore(); return mb_strpos($answer, $expected) === FALSE ? 0 : $this->getMaxScore(); } /** Loading