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

sscanf fails to return more than one parameter by reference #889

Closed
josephdfoley opened this issue Jan 3, 2021 · 1 comment
Closed

sscanf fails to return more than one parameter by reference #889

josephdfoley opened this issue Jan 3, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@josephdfoley
Copy link

josephdfoley commented Jan 3, 2021

Taken from codeigniter's Router.php, roughly:

$controller = 'user/login';

$returnVal = sscanf($controller, "%[^/]/%s", $c, $m);

$returnVal is 2, $c is user, but $m is null. Internally, ParseString() internally seems to be working properly, with $result[1] being login, but the assignment to $arguments[0] doesn't survive to the caller.

@jakubmisek jakubmisek self-assigned this Jan 4, 2021
@jakubmisek
Copy link
Member

thank you @josephdfoley!

@jakubmisek jakubmisek added this to the 1.0.0 milestone Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants