fixed Array to String Conversion error

if an array is used as the default value of a parameter the function was
trying to convert it to a string, which would throw an error (if that
level was enabled). Switched it to create its own string now