Skip to content

[2.6] Remove possible call_user_func() #12532

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

Merged
merged 1 commit into from
Dec 11, 2014

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Remove possible call_user_func() introduced in 2.6

@@ -929,7 +929,7 @@ public function offsetGet($option)
// dependency
// BEGIN
$this->calling[$option] = true;
$value = call_user_func($normalizer, $this, $value);
$value = $normalizer($this, $value);
Copy link
Contributor

Choose a reason for hiding this comment

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

these could both be array() format callables, this won't work?

Copy link
Member

Choose a reason for hiding this comment

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

no they cannot. See the typehint on setNormalizer, and the detection of lazy options. Both are enforcing the usage of a Closure

@stof
Copy link
Member

stof commented Nov 21, 2014

👍

@stof
Copy link
Member

stof commented Nov 21, 2014

btw, similar calls could be removed in 2.3 (the 2.6 branch has moved the logic to a different class in the component, but it is the same)

@fabpot
Copy link
Member

fabpot commented Dec 11, 2014

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 1de4920 into symfony:2.6 Dec 11, 2014
fabpot added a commit that referenced this pull request Dec 11, 2014
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6] Remove possible call_user_func()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Remove possible call_user_func() introduced in 2.6

Commits
-------

1de4920 [2.6] Remove possible call_user_func()
@nicolas-grekas nicolas-grekas deleted the no-call-user-func-26 branch December 11, 2014 19:21
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