Skip to content

Conversation

@peteruhnak
Copy link
Contributor

…n the $res array. [Fixes #99]

@dg
Copy link
Member

dg commented Oct 13, 2015

Nice catch!

Copy link
Member

Choose a reason for hiding this comment

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

Can you change it to simpler $reflection = new ReflectionMethod('MyPresenter', 'myMethod'); ?

@hranicka
Copy link
Contributor

👍

It's an annoying bug in v2.3.6.

Copy link
Contributor

Choose a reason for hiding this comment

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

$res[$i]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about I use the foreach instead?

foreach ($method->getParameters() as $i => $param) {

Copy link
Contributor

Choose a reason for hiding this comment

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

If the items in $method->getParameters() are indexed by numbers starting from zero then yes, it would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it returns regular array indexed from zero; I've changed it.

@enumag
Copy link
Contributor

enumag commented Oct 13, 2015

@peteruhnak Squash all the commits into one please.

…n the $res array. [Fixes #99]

Use foreach's automatic indexing instead of manual one.
dg added a commit that referenced this pull request Oct 13, 2015
PresenterComponentReflection::combineArgs() should retype variables i…
@dg dg merged commit e2e9721 into nette:master Oct 13, 2015
@hranicka
Copy link
Contributor

@dg Please when we would expect fixed release v2.3.7 (for orientation)?

@dg
Copy link
Member

dg commented Oct 13, 2015

Soon.

@peteruhnak peteruhnak deleted the combine-args-lost-reference branch October 13, 2015 15:06
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.

4 participants