Problem/Motivation

If you use decimal values as arguments in Views and allow multiple values, the query will always fail because HandlerBase::breakString() returns an empty value.
The regular expressions used to check for "," or "+" did not include dots as allowed values so a decimal value never gets caught. Additionally NumericArgument always enforces a transformation of the argument to integer.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stBorchert created an issue. See original summary.

stBorchert’s picture

Status: Active » Needs review
FileSize
3.7 KB

* modified the regular expressions in breakString() to allow dots
* do not enforce integer values in ArgumentNumeric
* add basic tests

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Looks great for me. We have extended test coverage and the regexes are just minor changed.

  • catch committed 3d91345 on 8.2.x
    Issue #2678620 by stBorchert: HandlerBase::breakString does not work...

  • catch committed 4b74a16 on 8.1.x
    Issue #2678620 by stBorchert: HandlerBase::breakString does not work...

  • catch committed f2c28cd on 8.0.x
    Issue #2678620 by stBorchert: HandlerBase::breakString does not work...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.2.x and cherry-picked to 8.1.x and 8.0.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.