wpdb::suppress_errors( bool $suppress = true )

Enables or disables suppressing of database errors.


Description Description

By default database errors are suppressed.

See also See also


Top ↑

Parameters Parameters

$suppress

(bool) (Optional) Whether to suppress errors.

Default value: true


Top ↑

Return Return

(bool) Whether suppressing of errors was previously active.


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.