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

Use ZVAL_COPY_VALUE when passing parameters #1419

Merged
merged 1 commit into from
Mar 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions kernels/ZendEngine3/fcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ int zephir_call_user_function(zval *object_pp, zend_class_entry *obj_ce, zephir_

zval p[fci.param_count];
for (i=0; i<fci.param_count; ++i) {
/** FIXME: ZVAL_COPY or ZVAL_COPY_VALUE? */
ZVAL_COPY(&p[i], params[i]);
ZVAL_COPY_VALUE(&p[i], params[i]);
Copy link
Contributor

Choose a reason for hiding this comment

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

You have a good memory 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just experience :-) I had a similar issue in PHP-CPP

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Parameter 3 to preg_match_all() expected to be a reference, value given" - this was the clue

}

fci.params = p;
Expand Down