WordPress at Your Fingertips
function is not described

Requests_Transport_fsockopen::connect_error_handler() public WP 1.0

Error handler for stream_socket_client()

{} It's a method of the class: Requests_Transport_fsockopen{}

No Hooks.


null. Nothing.


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

Code of Requests_Transport_fsockopen::connect_error_handler() WP 5.8

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;