Skip to content

Conversation

@freestream
Copy link
Contributor

When calling withErrors it assumes that any existing value in the session storage with key errors is of the correct data type. Due to errors is not a reserved key its very easy to get a BadMethodCallException exception.

For example

$request->session()->put('errors', []);

$this->validate($request, [
    'name'  => 'required',
]);

This would trigger the following stack trace.

BadMethodCallException in RedirectResponse.php line 136:
Call to a member function put() on a non-object (array)

@tillkruss tillkruss changed the title Corrected the optimistic setting of a value to a unknown type [5.4] Corrected the optimistic setting of a value to a unknown type May 31, 2017
@taylorotwell taylorotwell merged commit 33ae6a0 into laravel:5.4 Jun 1, 2017
@vlakoff
Copy link
Contributor

vlakoff commented Jun 1, 2017

With PRs merged like this one, I see the commits twice in my Git visual history. Once from the 5.4 branch, once from the contributor's branch. This adds a bit of clutter.

Previously I only had the commits from the contributor's branch, and of course the merge commit.

Are you trying a different method for merging?

@freestream freestream deleted the fix/optimist-object branch June 1, 2017 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants