File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -333,19 +333,17 @@ function ($match) use ($ret) {
333
333
334
334
private function mostRecentlyEnteredValue ($ entered )
335
335
{
336
- $ tempEntered = $ entered ;
337
-
338
336
// Determine the most recent value that the user entered
339
- if (false ! == strpos ($ entered , ', ' )) {
340
- $ choices = explode ( ' , ' , $ entered) ;
341
- $ lastChoice = trim ( $ choices [ \count ( $ choices ) - 1 ]);
337
+ if (false = == strpos ($ entered , ', ' )) {
338
+ return $ entered ;
339
+ }
342
340
343
- if ( \strlen ( $ lastChoice ) > 0 ) {
344
- $ tempEntered = $ lastChoice ;
345
- }
341
+ $ choices = explode ( ' , ' , $ entered );
342
+ if ( \strlen ( $ lastChoice = trim ( $ choices [ \count ( $ choices ) - 1 ])) > 0 ) {
343
+ return $ lastChoice ;
346
344
}
347
345
348
- return $ tempEntered ;
346
+ return $ entered ;
349
347
}
350
348
351
349
/**
You can’t perform that action at this time.
0 commit comments