You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know there's not many use-cases for this which is probably for why we missed it. If you were to try to use Faker.randomElement(), it uses an array as a parameter. This gives me Fatal error: Uncaught TypeError: Argument 1 passed to Faker\Provider\Base::randomElements() must be of the type array, string given
I understand why this is happening. Later in the stack trace it's showing me a Faker\Provider\Base::randomElement('array('top', 'left', 'right')'). So I believe that there's some code somewhere that's wrapping these parameters in quotes.... If I get some time I'll try to find it myself.
If there's a rational reason for why this is happening, perhaps we could enforce the newer [] array syntax? So we could not wrap it in quotes (make it a string) if the parameter starts with a '['?
The text was updated successfully, but these errors were encountered:
I know there's not many use-cases for this which is probably for why we missed it. If you were to try to use Faker.randomElement(), it uses an array as a parameter. This gives me
Fatal error: Uncaught TypeError: Argument 1 passed to Faker\Provider\Base::randomElements() must be of the type array, string given
I understand why this is happening. Later in the stack trace it's showing me a Faker\Provider\Base::randomElement('array('top', 'left', 'right')'). So I believe that there's some code somewhere that's wrapping these parameters in quotes.... If I get some time I'll try to find it myself.
If there's a rational reason for why this is happening, perhaps we could enforce the newer [] array syntax? So we could not wrap it in quotes (make it a string) if the parameter starts with a '['?
The text was updated successfully, but these errors were encountered: