W3cubDocs

/WordPress

wpdb::suppress_errors( bool $suppress = true )

Whether to suppress database errors.

Description

By default database errors are suppressed, with a simple call to this function they can be enabled.

See also

Parameters

$suppress

(bool) (Optional) New value. Defaults to true.

Default value: true

Return

(bool) Old value

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