WordPress at a glance
function is not described

wpdb::suppress_errors() public WP 2.5.0

Enables or disables suppressing of database errors.

By default database errors are suppressed.

{} It's a 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

  • See: wpdb::hide_errors()

Changelog

Since 2.5.0 Introduced.

Code of wpdb::suppress_errors() WP 5.5.1

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