| @@ -79,8 +79,13 @@ | ||
| 79 | 79 | if ( ! $post ) { |
| 80 | 80 | \WP_CLI::error( 'Post not found.' ); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - add_to_outbox( $post, 'Update', $post->post_author ); | |
| 83 | + $result = add_to_outbox( $post, 'Update', $post->post_author ); | |
| 84 | + | |
| 85 | + if ( \is_wp_error( $result ) ) { | |
| 86 | + \WP_CLI::error( $result->get_error_message() ); | |
| 87 | + } | |
| 88 | + | |
| 84 | 89 | \WP_CLI::success( '"Update" activity is queued.' ); |
| 85 | 90 | } |
| 86 | 91 | } |