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)
|
private function mostRecentlyEnteredValue($entered)
|
||||||
{
|
{
|
||||||
$tempEntered = $entered;
|
|
||||||
|
|
||||||
// Determine the most recent value that the user entered
|
// Determine the most recent value that the user entered
|
||||||
if (false !== strpos($entered, ',')) {
|
if (false === strpos($entered, ',')) {
|
||||||
$choices = explode(',', $entered);
|
return $entered;
|
||||||
$lastChoice = trim($choices[\count($choices) - 1]);
|
|
||||||
|
|
||||||
if (\strlen($lastChoice) > 0) {
|
|
||||||
$tempEntered = $lastChoice;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $tempEntered;
|
$choices = explode(',', $entered);
|
||||||
|
if (\strlen($lastChoice = trim($choices[\count($choices) - 1])) > 0) {
|
||||||
|
return $lastChoice;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $entered;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user