wpdb::hide_errors() WordPress Method

The wpdb::hide_errors() function is used to turn off displaying database errors. By default, database errors are displayed on the screen if they occur. Turning off display of errors may be useful during development or debugging.

wpdb::hide_errors() #

Disables showing of database errors.


Description

By default database errors are not shown.

Top ↑

See also


Top ↑

Return

(bool) Whether showing of errors was previously active.


Top ↑

Source

File: wp-includes/wp-db.php

	public function hide_errors() {
		$show              = $this->show_errors;
		$this->show_errors = false;
		return $show;
	}


Top ↑

Changelog

Changelog
VersionDescription
0.71Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.