WpOrg\Requests\Transport

Fsockopen::connect_error_handler()publicWP 1.0

Error handler for stream_socket_client()

Method of the class: Fsockopen{}

No Hooks.

Return

null. Nothing (null).

Usage

$Fsockopen = new Fsockopen();
$Fsockopen->connect_error_handler( $errno, $errstr );
$errno(int) (required)
Error number (e.g. E_WARNING)
$errstr(string) (required)
Error message

Fsockopen::connect_error_handler() code WP 6.6.2

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;
}