WP_Customize_Selective_Refresh::handle_error( int $errno, string $errstr, string $errfile = null, int $errline = null ): true

Handles PHP errors triggered during rendering the partials.

Description

These errors will be relayed back to the client in the Ajax response.

Parameters

$errnointrequired
Error number.
$errstrstringrequired
Error string.
$errfilestringoptional
Error file.

Default:null

$errlineintoptional
Error line.

Default:null

Return

true Always true.

Source

public function handle_error( $errno, $errstr, $errfile = null, $errline = null ) {
	$this->triggered_errors[] = array(
		'partial'      => $this->current_partial_id,
		'error_number' => $errno,
		'error_string' => $errstr,
		'error_file'   => $errfile,
		'error_line'   => $errline,
	);
	return true;
}

Changelog

VersionDescription
4.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.