Requests_Exception_HTTP_Unknown::__construct()publicWP 1.0

Create a new exception

If $data is an instance of Requests_Response{}, uses the status code from it. Otherwise, sets as 0

{} Это метод класса: Requests_Exception_HTTP_Unknown{}

Хуков нет.


null. Ничего.


$Requests_Exception_HTTP_Unknown = new Requests_Exception_HTTP_Unknown();
$Requests_Exception_HTTP_Unknown->__construct( $reason, $data );
Reason phrase
По умолчанию: null
Associated data
По умолчанию: null

Код Requests_Exception_HTTP_Unknown::__construct() WP 6.1.1

public function __construct($reason = null, $data = null) {
	if ($data instanceof Requests_Response) {
		$this->code = $data->status_code;

	parent::__construct($reason, $data);