WP_CLI
UpgraderSkin::error
Show error message.
Method of the class: UpgraderSkin{}
No Hooks.
Returns
null. Nothing (null).
Usage
$UpgraderSkin = new UpgraderSkin(); $UpgraderSkin->error( $error );
- $error(string) (required)
- Error message.
UpgraderSkin::error() UpgraderSkin::error code WP-CLI 2.13.0-alpha
public function error( $error ) {
if ( ! $error ) {
return;
}
if ( is_string( $error ) && isset( $this->upgrader->strings[ $error ] ) ) {
$error = $this->upgrader->strings[ $error ];
}
// TODO: show all errors, not just the first one
WP_CLI::warning( $error );
}