WP_CLI

Runner::enable_error_reporting()privateWP-CLI 1.0

Enables (almost) full PHP error reporting to stderr.

Method of the class: Runner{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->enable_error_reporting();

Runner::enable_error_reporting() code WP-CLI 2.8.0-alpha

private function enable_error_reporting() {
	if ( E_ALL !== error_reporting() ) {
		// Don't enable E_DEPRECATED as old versions of WP use PHP 4 style constructors and the mysql extension.
		error_reporting( E_ALL & ~E_DEPRECATED );
	}
	ini_set( 'display_errors', 'stderr' ); // phpcs:ignore WordPress.PHP.IniSet.display_errors_Blacklisted
}