Closed (fixed)
Project:
Rules
Version:
7.x-2.0-beta1
Component:
Rules Engine
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2011 at 21:27 UTC
Updated:
7 Jun 2011 at 09:21 UTC
The reasons behind this is that php returns false for:
<?php if (is_numeric("1\n"));?>
When entering a list of numeric types, the newlines will be appended.
This results in the string "1\n".
Attached is a patch that prefixes "trim" in front of the is_numeric checks.
Should the value itself be "trimmed"??
There may be a lot more places where this needs to be done.
| Comment | File | Size | Author |
|---|---|---|---|
| rules-7.x-2.0-beta1-numeric_types-1.patch | 1.12 KB | thekevinday |
Comments
Comment #2
fago>Should the value itself be "trimmed"??
Yes! I took a stab on that and improved the direct input of integers such that the values are trimmed. Also, I changed it to be comma-separated and implemented the same for lists of text tokens and lists of entities / entity ids.
Please test whether the next dev snapshot works for you.