In PastEventArgument->ensureType the PHP function gettype() is called to get the type of the argument. The PHP docs says that if a float is passed to that function, the string "double" is returned for historical (and quite annoying) reasons: http://dk1.php.net/manual/en/function.gettype.php
If floats are passed in as arguments, the display of them later in admin/reports/past/xx fails with a "Cannot access empty property in ..../past_db.entity.inc on line 274" because the scalar test failed and we attempt to make the data into an object.
Patch correctes "float" to "double".
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | float-is-double-2035771-2.patch | 1.36 KB | berdir |
| #2 | float-is-double-2035771-2-test-only.patch | 660 bytes | berdir |
| float-is-double.patch | 737 bytes | naxoc |
Comments
Comment #1
miro_dietikerSeems fine, but seems we need test coverage here.
Comment #2
berdirAh, nice find, I've seen this one too and wasn't sure why.
Here are tests for it.
Comment #4
berdirFailed as expected, committed and pushed.