Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Conversation

weierophinney
Copy link
Member

@weierophinney weierophinney commented Dec 11, 2017

Provides a new method, IsCallableInteropMiddlewareTrait::isCallable(), which runs its argument through is_callable(). If the value passes, it then checks to see if it is an array, and, if so, if:

  • the first argument is an object or valid class name, AND
  • the second argument is a valid method of the first argument.

This is done because is_callable() returns a false positive when a two-element array is passed where the first argument is an object and the second a string; the function does not verify that the second element is a valid method of the first.

Fixes #527

Provides a new method, `IsCallableInteropMiddlewareTrait::isCallable()`,
which runs its argument through `is_callable()`. If the value passes, it
then checks to see if it is an array, and, if so, if:

- the first argument is an object or valid class name, AND
- the second argument is a valid method of the first argument.

This is done because `is_callable()` returns a false positive when a
two-element array is passed where the first argument is an object and
the second a string; the function does not verify that the second
element is a valid method of the first.
@weierophinney weierophinney merged commit 63fe808 into zendframework:master Dec 11, 2017
weierophinney added a commit that referenced this pull request Dec 11, 2017
weierophinney added a commit that referenced this pull request Dec 11, 2017
…evelop

Forward port #534

Conflicts:
	test/ApplicationTest.php
@weierophinney weierophinney deleted the hotfix/527-pipe-with-something-looking-callable branch December 11, 2017 20:50
weierophinney added a commit that referenced this pull request Dec 11, 2017
weierophinney added a commit that referenced this pull request Dec 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant