wpdb::suppress_errors()publicWP 2.5.0

Enables or disables suppressing of database errors.

By default database errors are suppressed.

Method of the class: wpdb{}

No Hooks.

Return

true|false. Whether suppressing of errors was previously active.

Usage

global $wpdb;
$wpdb->suppress_errors( $suppress );
$suppress(true|false)
Whether to suppress errors.
Default: true

Notes

Changelog

Since 2.5.0 Introduced.

wpdb::suppress_errors() code WP 6.1.1

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