Uses
Uses | Description |
---|---|
wp-includes/Requests/Exception/HTTP.php: Requests_Exception_HTTP::__construct() | Create a new exception |
Create a new exception
If $data
is an instance of Requests_Response, uses the status code from it. Otherwise, sets as 0
(string|null) (Optional) Reason phrase
Default value: null
(mixed) (Optional) Associated data
Default value: null
File: wp-includes/Requests/Exception/HTTP/Unknown.php
public function __construct($reason = null, $data = null) { if ($data instanceof Requests_Response) { $this->code = $data->status_code; } parent::__construct($reason, $data); }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_exception_http_unknown/__construct