Fix for array values in log

When entity has an array value there is a
Notice: Array to string conversion
throwed. This fix checks if value is an array and put "an array" instead of array variable to log.

Maybe it will be better to var_export($x, true), but somethimes, this also can throw an exception.

I think there is a need to create something for objects that do not have __toString implemented.