wpdb::suppress_errors( bool $suppress = true ): bool

Enables or disables suppressing of database errors.

Description

By default database errors are suppressed.

See also

Parameters

$suppressbooloptional
Whether to suppress errors.

Default:true

Return

bool Whether suppressing of errors was previously active.

Source

public function suppress_errors( $suppress = true ) {
	$errors                = $this->suppress_errors;
	$this->suppress_errors = (bool) $suppress;
	return $errors;
}

Changelog

VersionDescription
2.5.0Introduced.

User Contributed Notes

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