@unobab123 can you provide the source of the view?
error in laravel 4.3
htmlentities() expects parameter 1 to be string, array given (View: /Users/unobab/laravel43/resources/views/auth/register.blade.php)
Given that it's occurring in a template file named registration, I'm going to assume that it's Form related.
In that case, it often happens when you neglect to pass a string as the 2nd argument ($value) to the FormBuilder's email(), hidden(), text(), or url() methods or as the 3rd argument ($value) on the input() method... For example, something like this:
// Both of these will show the following error...
// htmlentities() expects parameter 1 to be string, array given
{{ Form::text('test', ['class' => 'form-control']) }}
{{ Form::input('text', 'test', ['class' => 'form-control']) }}
Should be:
{{ Form::text('test', null, ['class' => 'form-control']) }}
{{ Form::input('text', 'test', null, ['class' => 'form-control']) }}
This happens because the attributeElement() method in the HtmlBuilder doesn't check that the value is_string() before running it through e() which is a helper method that executes htmlentities()
protected function attributeElement($key, $value)
{
if (is_numeric($key)) $key = $value;
if ( ! is_null($value)) return $key.'="'.e($value).'"';
}
Please or to participate in this conversation.