Use foreach loop rather than array_map() to invoke do_hook() callbacks#1208
Merged
danielbachhuber merged 2 commits intowp-cli:masterfrom May 14, 2014
Merged
Use foreach loop rather than array_map() to invoke do_hook() callbacks#1208danielbachhuber merged 2 commits intowp-cli:masterfrom
danielbachhuber merged 2 commits intowp-cli:masterfrom
Conversation
array_map( 'call_user_func', $hooks ) causes segmentation faults on PHP 5.5.12.
Member
|
@boonebgorges Can you change |
Contributor
Author
|
👍 |
Member
|
🐶 |
Contributor
Author
|
💋 |
danielbachhuber
added a commit
that referenced
this pull request
May 14, 2014
Use foreach loop rather than array_map() to invoke do_hook() callbacks
Member
|
@boonebgorges up for opening a ticket on bugs.php.net? I'd classify this as a genuine bug, and it would be good to see through to its completion. |
Contributor
Author
|
Yeah, let me first set up a couple vms to see if I can narrow down the On 05/14/2014 06:42 PM, Daniel Bachhuber wrote:
|
danielbachhuber
added a commit
that referenced
this pull request
May 14, 2014
Use foreach loop rather than array_map() to invoke do_hook() callbacks Conflicts: .travis.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third-level subcommands (
wp bp group get_members) are causing segmentation faults on my setup (wp-cli 0.15.0 or bdd601c; PHP 5.5.12). I traced the problem toWP_CLI::do_hook(), and the following line:Changing to a foreach loop removes the problem.
I tried a bit of research, but couldn't find a root cause (eg on the PHP bug tracker).
See also #1175, #969