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) {
333333
334334 private function mostRecentlyEnteredValue ($ entered )
335335 {
336- $ tempEntered = $ entered ;
337-
338336 // 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+ }
342340
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 ;
346344 }
347345
348- return $ tempEntered ;
346+ return $ entered ;
349347 }
350348
351349 /**
You can’t perform that action at this time.
0 commit comments