return array_keys( $this->errors
);
} /**
* Retrieves the first error code available.
*
* @since 2.1.0
*
* @return string|int Empty string, if no error codes.
*/
public function get_error_code() { $codes =
$this->
get_error_codes();
if ( empty( $codes ) ) { return '';
} return $codes[0
];
} /**
* Retrieves all error messages, or the error messages for the given error code.
*
* @since 2.1.0
*
* @param string|int $code Optional. Error code to retrieve the messages for.
* Default empty string.
* @return string[] Error strings on success, or empty array if there are none.
*/