Skip to content

Commit f8a0b3e

Browse files
author
rob
committed
allow backward compatibility with current config installs
1 parent d1c8ed2 commit f8a0b3e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Abstracts/Middleware.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,16 @@ public function respond($response, $data = [])
156156
return Redirect::to($redirect);
157157
}
158158

159-
if ($exception = $response['exception']) {
160-
throw new $exception();
161-
}
162-
163159
if ($response['abort']) {
164160
abort($response['code'], trans('firewall::responses.block.message'));
165161
}
166162

163+
if (array_key_exists('exception', $response)) {
164+
if ($exception = $response['exception']) {
165+
throw new $exception();
166+
}
167+
}
168+
167169
return Response::make(trans('firewall::responses.block.message'), $response['code']);
168170
}
169171
}

0 commit comments

Comments
 (0)