Closed vdechenaux closed 7 years ago
I don't know if your fix really is correct.
ObjectContext
wraps objects so that RulerZ can seamlessly traverse the object graph when evaluating rules like this one: user.address.street = :street
If we somehow stop wrapping the original data because we encounter an array, we break this graph traversal.
I think that we should "fix" RulerZ so that it unwraps the parameters (if needed) before calling operators. First, I'll write some failing tests and then I'll experiment with a solution :)
Should be fixed in master :)
Hi,
I'm trying to upgrade from
0.17.x
to0.19.3
and my custom operatorintersects
is not working:I have this error:
Warning: array_intersect(): Argument #1 is not an array /tmp/rulerz_executor_f2795b9b:16
. My array is wrapped by aObjectContext
. Maybe it shouldn't?This patch seems to fix the problem.
So, what do you think? :thinking: