W3cubDocs

/WordPress

wpdb::suppress_errors( bool $suppress = true )

Enables or disables suppressing of database errors.

Description

By default database errors are suppressed.

See also

Parameters

$suppress

(bool) (Optional) Whether to suppress errors.

Default value: true

Return

(bool) Whether suppressing of errors was previously active.

Source

File: wp-includes/wp-db.php

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

Changelog

Version Description
2.5.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wpdb/suppress_errors