Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect->route wrong docu or default values #1125

Closed
puschie286 opened this issue Aug 1, 2018 · 3 comments
Closed

redirect->route wrong docu or default values #1125

puschie286 opened this issue Aug 1, 2018 · 3 comments

Comments

@puschie286
Copy link
Contributor

hey, currently the redirect function not work like the docu describe it. Link
it result in an
Argument 3 passed to CodeIgniter\HTTP\Response::redirect() must be of the type integer, null given
because route has null as default $code value which is not valid ( but suggested by the documentation )

so what behavior is the right one ?
(personally i would remove the default value of $code ( and switch $params and $code ) )
public function route(string $route, array $params=[], int $code=null, string $method='auto')

@lonnieezell
Copy link
Member

Please provide a code sample how you're using this. The docs you linked to are for the common function redirect() while it looks like samples you're showing are calling it directly on the Response object, so I'm a bit confused.

@puschie286
Copy link
Contributor Author

// Go to a named/reverse-routed URI
return redirect()->route('named_route');

@puschie286
Copy link
Contributor Author

fixed by #1147

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

No branches or pull requests

2 participants