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".

Comments

miro_dietiker’s picture

Seems fine, but seems we need test coverage here.

berdir’s picture

Ah, nice find, I've seen this one too and wasn't sure why.

Here are tests for it.

Status: Needs review » Needs work

The last submitted patch, float-is-double-2035771-2-test-only.patch, failed testing.

berdir’s picture

Status: Needs work » Fixed

Failed as expected, committed and pushed.

Status: Fixed » Closed (fixed)

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