Skip to content

Commit c0fb183

Browse files
committed
update addons
1 parent 6a17923 commit c0fb183

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inc/admin-pages/class-addons-admin-page.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ protected function get_addons_list() {
309309

310310
$data = $api_client->get_addons();
311311

312-
if (is_wp_error($data)) {
312+
if (is_wp_error($data) || empty($data)) {
313313
// translators: %s error message.
314-
wu_log_add('api-calls', sprintf(__('Failed to fetch addons from API: %s'), $data->get_error_message()));
314+
wu_log_add('api-calls', sprintf(__('Failed to fetch addons from API: %s', 'multisite-ultimate'), $data ? $data->get_error_message() : __('no addons returned', 'multisite-ultimate')));
315315
return array();
316316
}
317317

0 commit comments

Comments
 (0)