Skip to content

param2path failed when given integer #185

@MartkCz

Description

@MartkCz
  • bug report? yes
  • feature request? no
  • version: dev-master f0b30ff

Description

I tried to generate link:

{plink News:detail category => $news->getCategory()->getName(), id => $news->getId(), name => $news->getSubject()}

and it's failed in class Route in method param2path: https://github.com/nette/application/blob/master/src/Application/Routers/Route.php#L330

TypeError: Argument 1 passed to Nette\Application\Routers\Route::param2path() must be of the type string, integer given

Dump of params:
category => "xxx"
id => 3614
name => "xxx"
action => "xxx"

It's ok:

{plink News:detail category => $news->getCategory()->getName(), id => (string) $news->getId(), name => $news->getSubject()}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions