diff --git a/src/Client/Cookies.php b/src/Client/Cookies.php index 08ee8fe7ce..cbbb14756a 100644 --- a/src/Client/Cookies.php +++ b/src/Client/Cookies.php @@ -340,7 +340,7 @@ protected function _matchPath($domains, $path) */ public static function fromResponse(Response $response, $ref_uri) { - $jar = new self(); + $jar = new static(); $jar->addCookiesFromResponse($response, $ref_uri); return $jar; } diff --git a/src/Cookies.php b/src/Cookies.php index 0b236c7406..b4b5d7ae57 100644 --- a/src/Cookies.php +++ b/src/Cookies.php @@ -317,7 +317,7 @@ protected function _matchPath($domains, $path) */ public static function fromResponse(Response $response, $ref_uri) { - $jar = new self(); + $jar = new static(); $jar->addCookiesFromResponse($response, $ref_uri); return $jar; }