Skip to content

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

Description

@luisdev1

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions