Requests_Transport_fsockopen::connect_error_handler() WordPress Method

The Requests_Transport_fsockopen::connect_error_handler() is a Wordpress method used to handle errors when connecting to a server using the fsockopen() function. This function is used to open a socket connection to a server. If an error occurs during the connection process, this method will be called.

Requests_Transport_fsockopen::connect_error_handler( int $errno, string $errstr ) #

Error handler for stream_socket_client()


Parameters

$errno

(int)(Required)Error number (e.g. E_WARNING)

$errstr

(string)(Required)Error message


Top ↑

Source

File: wp-includes/Requests/Transport/fsockopen.php

	public function connect_error_handler($errno, $errstr) {
		// Double-check we can handle it
		if (($errno & E_WARNING) === 0 && ($errno & E_NOTICE) === 0) {
			// Return false to indicate the default error handler should engage
			return false;
		}

		$this->connect_error .= $errstr . "\n";
		return true;
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.