Merge branch '3.4' into 4.2
* 3.4: refactored code
This commit is contained in:
commit
3fc97ce1c5
@ -328,19 +328,17 @@ class QuestionHelper extends Helper
|
||||
|
||||
private function mostRecentlyEnteredValue($entered)
|
||||
{
|
||||
$tempEntered = $entered;
|
||||
|
||||
// Determine the most recent value that the user entered
|
||||
if (false !== strpos($entered, ',')) {
|
||||
if (false === strpos($entered, ',')) {
|
||||
return $entered;
|
||||
}
|
||||
|
||||
$choices = explode(',', $entered);
|
||||
$lastChoice = trim($choices[\count($choices) - 1]);
|
||||
|
||||
if (\strlen($lastChoice) > 0) {
|
||||
$tempEntered = $lastChoice;
|
||||
}
|
||||
if (\strlen($lastChoice = trim($choices[\count($choices) - 1])) > 0) {
|
||||
return $lastChoice;
|
||||
}
|
||||
|
||||
return $tempEntered;
|
||||
return $entered;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user