Skip to content

Commit

Permalink
Confirm Ajax request is not Pjax (#14024)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightwatson authored and taylorotwell committed Jun 17, 2016
1 parent c042ea7 commit acc0c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Http/FormRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected function failedAuthorization()
*/
public function response(array $errors)
{
if ($this->ajax() || $this->wantsJson()) {
if (($this->ajax() && ! $this->pjax()) || $this->wantsJson()) {
return new JsonResponse($errors, 422);
}

Expand Down

0 comments on commit acc0c96

Please sign in to comment.