We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c77af87 commit c3da862Copy full SHA for c3da862
Helper/QuestionHelper.php
@@ -379,12 +379,13 @@ private function mostRecentlyEnteredValue(string $entered): string
379
return $entered;
380
}
381
382
- $choices = explode(',', $entered);
383
- if ('' !== $lastChoice = trim($choices[\count($choices) - 1])) {
384
- return $lastChoice;
+ if (false === $lastCommaPos = strrpos($entered, ',')) {
+ return $entered;
385
386
387
- return $entered;
+ $lastChoice = trim(substr($entered, $lastCommaPos + 1));
+
388
+ return '' !== $lastChoice ? $lastChoice : $entered;
389
390
391
/**
0 commit comments