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

Issue #2527162: Cannot call global functions that take a method by reference (follow-up) #83

Merged
merged 1 commit into from
Jul 7, 2015

Conversation

drupol
Copy link
Collaborator

@drupol drupol commented Jul 6, 2015

No description provided.

@drupol
Copy link
Collaborator Author

drupol commented Jul 6, 2015

The best of both worlds ;-)

foreach($args as $key => &$arg) {
$args_reference[$key] = &$arg;
}
call_user_func_array($method, $args_reference);
Copy link
Owner

Choose a reason for hiding this comment

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

Missing return ...

everywhere, that is why travis failed.

foreach($args as $key => &$arg){
$args_reference[$key] = &$arg;
switch(count($args)) {
case 1:
Copy link
Owner

Choose a reason for hiding this comment

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

The 0 case is not handled.

return $method();

@LionsAd
Copy link
Owner

LionsAd commented Jul 7, 2015

CNW

$method($args[0], $args[1], $args[2]);
break;
case 4:
$method($args[0], $args[1], $args[2], $args[3], $args[4]);
Copy link
Owner

Choose a reason for hiding this comment

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

BUG - Travis found, needs to be only to $args[3] here.

@drupol drupol self-assigned this Jul 7, 2015
@LionsAd LionsAd added RTBM and removed Needs review labels Jul 7, 2015
drupol added a commit that referenced this pull request Jul 7, 2015
Issue #2527162: Cannot call global functions that take a method by reference (follow-up)
@drupol drupol merged commit 1c007ed into LionsAd:7.x-1.x Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants