Skip to content

Commit d81a202

Browse files
fix catch without variable name in 7.4
1 parent a4120fb commit d81a202

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/class-jetpack-importer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function start_import(): void
134134
if ($date_end < $date_start) {
135135
throw new Exception("End date must be after start date");
136136
}
137-
} catch (Exception) {
137+
} catch (Exception $e) {
138138
$this->redirect_with_error(admin_url('/index.php?page=koko-analytics&tab=jetpack_importer'), __('Invalid date fields', 'koko-analytics'));
139139
exit;
140140
}
@@ -251,7 +251,7 @@ public function perform_chunk_import(string $api_key, string $blog_uri, DateTime
251251
$body = wp_remote_retrieve_body($response);
252252
try {
253253
$data = json_decode($body, null, 512, JSON_THROW_ON_ERROR);
254-
} catch (Exception) {
254+
} catch (Exception $e) {
255255
throw new Exception(__('Received non-JSON response from WordPress.com API:', 'koko-analytics') . "\n\n" . $body);
256256
}
257257

0 commit comments

Comments
 (0)