WordPress at a glance
function is not described

WP_Error::has_errors() public WP 5.1.0

Verifies if the instance contains errors.

{} It's a method of the class: WP_Error{}

No Hooks.

Return

true|false. If the instance contains errors.

Usage

$WP_Error = new WP_Error();
$WP_Error->has_errors();

Changelog

Since 5.1.0 Introduced.

Code of WP_Error::has_errors() WP 5.7

<?php
public function has_errors() {
	if ( ! empty( $this->errors ) ) {
		return true;
	}
	return false;
}