Skip to content

Conversation

@davidkrmela
Copy link
Contributor

This fixes inconsistent between $presenter->link and $linkGenerator->link. Presenter throws exception, but LinkGenerator returns URL, for example http://www.example.com/presenter/action?0=10.

@dg
Copy link
Member

dg commented Jun 11, 2016

👍

@dg dg merged commit 321e314 into nette:master Jun 11, 2016
|| method_exists($class, $method = $class::formatRenderMethod($action))
) {
UI\Presenter::argsToParams($class, $method, $params);
} elseif (array_key_exists(0, $params)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be optimized with isset(), links generation is quite repeated task.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would allow 0 => NULL.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrach probably meant isset($params[0]) || array_key_exists(0, $params)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was what I meant, but the or discards the added value :(

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants