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

Fixed Volt::callMacro #11765

Merged
merged 3 commits into from
May 10, 2016
Merged

Fixed Volt::callMacro #11765

merged 3 commits into from
May 10, 2016

Conversation

sergeyklay
Copy link
Contributor

No description provided.

{
var macro;

if !fetch macro, this->_macros[name] {
throw new Exception("Macro '" . name . "' does not exist");
}

return call_user_func_array(macro, arguments);
return call_user_func(macro, arguments);
Copy link
Contributor

@Jurigag Jurigag May 9, 2016

Choose a reason for hiding this comment

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

This will break functions https://github.com/phalcon/cphalcon/blob/2.1.x/phalcon/mvc/view/engine/volt/compiler.zep#L555

It won't pass arguments properly to them beacause call_user_func works diffrently than call_user_func_array. It will just pass whole array of arguments as first argument to our custom function.

Copy link
Contributor Author

@sergeyklay sergeyklay May 9, 2016

Choose a reason for hiding this comment

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

Provide please script to reproduce the bug

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.

3 participants