Skip to content

Commit

Permalink
Fix bug #5127 (#5128)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFreeman committed Aug 19, 2023
1 parent 9037f0d commit b43bff8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions ext-src/swoole_http2_client_coro.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ void php_swoole_http2_client_coro_minit(int module_number) {
zend_declare_property_null(swoole_http2_request_ce, ZEND_STRL("cookies"), ZEND_ACC_PUBLIC);
zend_declare_property_string(swoole_http2_request_ce, ZEND_STRL("data"), "", ZEND_ACC_PUBLIC);
zend_declare_property_bool(swoole_http2_request_ce, ZEND_STRL("pipeline"), 0, ZEND_ACC_PUBLIC);
zend_declare_property_bool(swoole_http2_request_ce, ZEND_STRL("usePipelineRead"), 0, ZEND_ACC_PUBLIC);

zend_declare_property_long(swoole_http2_response_ce, ZEND_STRL("streamId"), 0, ZEND_ACC_PUBLIC);
zend_declare_property_long(swoole_http2_response_ce, ZEND_STRL("errCode"), 0, ZEND_ACC_PUBLIC);
Expand Down
14 changes: 14 additions & 0 deletions tests/swoole_http2_client_coro/bug_5127.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--TEST--
swoole_http2_client_coro: Github #5127 When use swoole in php 8.2,Swoole\Http2\Request may throw ErrorException:Creation of dynamic property $usePipelineRead
--SKIPIF--
<?php require __DIR__ . '/../include/skipif.inc'; ?>
--FILE--
<?php
require __DIR__ . '/../include/bootstrap.php';

$request = new Swoole\Http2\Request();
$request->usePipelineRead = true;
echo 'DONE';
?>
--EXPECT--
DONE

0 comments on commit b43bff8

Please sign in to comment.