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

Wildcard: TypeError: rawurlencode() expects parameter 1 to be string, int given #23

Closed
gkralik opened this issue Dec 11, 2020 · 1 comment · Fixed by #24
Closed

Wildcard: TypeError: rawurlencode() expects parameter 1 to be string, int given #23

gkralik opened this issue Dec 11, 2020 · 1 comment · Fixed by #24
Labels
Bug Something isn't working
Milestone

Comments

@gkralik
Copy link
Contributor

gkralik commented Dec 11, 2020

BC Break Report

Q A
Version 3.4.0

Summary

Starting from version 3.4.0, the Wildcard route throws a TypeError when passing int parameters to rawurlencode(). This has previously worked just fine (up to version 3.3.2). It seems a cast to string is missing before encoding parameter values. It looks like the culprit could be zendframework/zend-router#44.

It looks like a similar problem as #14

Tested on PHP 7.3 and PHP 7.4

Previous behavior

No TypeError is thrown when passing int params to Wildcard::assemble().

Current behavior

When passing int params to Wildcard::assemble(), a TypeError is thrown when invoking rawurlencode().

How to reproduce

$wildcard = new \Laminas\Router\Http\Wildcard();

echo $wildcard->assemble([
    'int_param' => 1,
]);

// throws TypeError: rawurlencode() expects parameter 1 to be string, int given
@weierophinney
Copy link
Member

Fixed with #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants