Fixed php error for "in" operator

I have added the tests and also fixed the php error ``An exception has been thrown during the rendering of a template ("strlen() expects parameter 1 to be string, array given")``.
I don't understand. Testing if a resource/object is part of a string does not make any sense to me. That should not be supported and should always return false.