Merge remote-tracking branch 'origin/v3.x'
authorMichael Wallner <mike@php.net>
Thu, 9 Jun 2022 08:56:12 +0000 (10:56 +0200)
committerMichael Wallner <mike@php.net>
Thu, 9 Jun 2022 08:56:12 +0000 (10:56 +0200)
src/php_http_client.c
tests/helper/dump.inc

index a272fa45d0a4f6c2658b20273b828b57f7c0097f..dcdfffab4ffd572fe5213c516423c81faa77e159 100644 (file)
@@ -807,6 +807,8 @@ static PHP_METHOD(HttpClient, requeue)
                        if (fci.object) {
                                GC_ADDREF(fci.object);
                        }
+                       e->closure.fci = fci;
+                       e->closure.fcc = fcc;
                }
                RETURN_ZVAL(getThis(), 1, 0);
        }
index 5612d06e606eca70e860e9d168ee1c55cff06f07..59d258c46f8c9681e863ed82cc1d3e4e27eed59b 100644 (file)
@@ -18,7 +18,7 @@ function dump_message($stream, http\Message $msg, $parent = false) {
        fprintf($stream, "%s\n", $msg->getInfo());
        dump_headers($stream, $msg->getHeaders());
        $msg->getBody()->toStream($stream);
-       
+
        if ($parent && ($msg = $msg->getParentMessage())) {
                dump_message($stream, $msg, true);
        }
@@ -28,7 +28,9 @@ function dump_responses($client, array $expect_cookie = []) {
        while (($r = $client->getResponse())) {
                dump_headers(null, $r->getHeaders());
                if ($expect_cookie) {
-                       $got_cookies = array_merge(...array_map(fn($c) => $c->getCookies(), $r->getCookies()));
+                       $got_cookies = array_merge(...array_map(function($c) {
+                               return $c->getCookies();
+                       }, $r->getCookies()));
                        if ($expect_cookie != $got_cookies) {
                                var_dump($expect_cookie, $got_cookies);
                                echo $r->toString(true);