wpdb::suppress_errors( bool $suppress = true )

Whether to suppress database errors.


Description Description

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

See also See also


Top ↑

Parameters Parameters

$suppress

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

Default value: true


Top ↑

Return Return

(bool) Old value


Top ↑

Source Source

File: wp-includes/wp-db.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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