-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add dedicated StreamBucket class #13111
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ Bug #39551 (Segfault with stream_bucket_new in user filter) | |
<?php | ||
|
||
$bucket = stream_bucket_new(fopen('php://temp', 'w+'), ''); | ||
var_dump($bucket); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As you're really only interested in the class, perhaps use:
Then you don't have to update the test later when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good idea if there were other tests which ensured the structure of |
||
|
||
class bucketFilter extends php_user_filter { | ||
public function filter($in, $out, &$consumed, $closing ): int { | ||
|
@@ -20,5 +21,15 @@ stream_get_contents($s); | |
|
||
echo "Done\n"; | ||
?> | ||
--EXPECT-- | ||
--EXPECTF-- | ||
object(StreamBucket)#%d (%d) { | ||
["bucket"]=> | ||
resource(%d) of type (userfilter.bucket) | ||
["data"]=> | ||
string(0) "" | ||
["datalen"]=> | ||
int(0) | ||
["dataLength"]=> | ||
int(0) | ||
} | ||
Done |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.