GC_Error::get_error_data()
最后更新于:2021-11-27 14:43:48
GC_Error::get_error_data( string|int$code=”)Retrieves the most recently added error data for an error code.
参数
- $code
-
(string|int) (Optional) Error code.
Default value: ”
响应
(mixed) Error data, if it exists.
源文件
文件: gc-includes/class-gc-error.php
public function get_error_data( $code = '' ) {
if ( empty( $code ) ) {
$code = $this->get_error_code();
}
if ( isset( $this->error_data[ $code ] ) ) {
return $this->error_data[ $code ];
}
}