| @@ -21,9 +21,9 @@ | ||
| 21 | 21 | * Return the report title |
| 22 | 22 | * |
| 23 | 23 | * @return string |
| 24 | 24 | */ |
| 25 | - public function get_title() : string { | |
| 25 | + public function get_title(): string { | |
| 26 | 26 | return __( 'Last Sync', 'elasticpress' ); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
| @@ -30,12 +30,12 @@ | ||
| 30 | 30 | * Return the report fields |
| 31 | 31 | * |
| 32 | 32 | * @return array |
| 33 | 33 | */ |
| 34 | - public function get_groups() : array { | |
| 34 | + public function get_groups(): array { | |
| 35 | 35 | $fields = []; |
| 36 | 36 | |
| 37 | - $sync_info = \ElasticPress\IndexHelper::factory()->get_last_index(); | |
| 37 | + $sync_info = \ElasticPress\IndexHelper::factory()->get_last_sync(); | |
| 38 | 38 | |
| 39 | 39 | if ( empty( $sync_info ) ) { |
| 40 | 40 | return []; |
| 41 | 41 | } |
| @@ -110,9 +110,9 @@ | ||
| 110 | 110 | 'label' => $labels[ $label ] ?? $label, |
| 111 | 111 | 'value' => $value, |
| 112 | 112 | ]; |
| 113 | 113 | } |
| 114 | - $title = $sync_info['start_date_time']; | |
| 114 | + $title = $sync_info['start_date_time'] ?? ''; | |
| 115 | 115 | if ( false !== \ElasticPress\Utils\get_indexing_status() ) { |
| 116 | 116 | /* translators: last sync title */ |
| 117 | 117 | $title = sprintf( __( '%s (In Progress)', 'elasticpress' ), $title ); |
| 118 | 118 | } |