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

Bug: CodeIgniter\Router\Router->checkRoutes() strpos() expects parameter 1 to be string, array given #2479

Closed
luisdev1 opened this issue Jan 10, 2020 · 2 comments · Fixed by #2481
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@luisdev1
Copy link

Describe the bug
Attempting to add a route redirection within a namespace route group is returning a parameterization error or an inconsistent redirection (Ex: http://localhost:8080/Acme/Blog/Controllers/blogIndex)

CodeIgniter 4 [version`]
develop

Affected module(s)
CodeIgniter\Router\Router

Expected behavior, and steps to reproduce if appropriate
The example code
$routes->group('blog', ['namespace' => 'Acme\Blog\Controllers'], function($routes){

$routes->add('list', 'Home::index', ['as' => 'blogIndex']); 

$routes->addRedirect('/', 'blogIndex'); 

});

Context

  • OS: macOS 10.15.2
  • Web server: Apache 2.2.34
  • PHP version 7.3
@luisdev1 luisdev1 added the bug Verified issues on the current code behavior or pull requests that will fix them label Jan 10, 2020
@nyufeng
Copy link
Contributor

nyufeng commented Jan 10, 2020

try.

@luisdev1
Copy link
Author

@Instrye That changes working for me! Thanks!

#2481

lonnieezell added a commit that referenced this issue Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants