fix: add intval#483

This commit is contained in:
vnmedeiros 2021-03-05 17:03:41 -03:00
parent 3cddb9b81b
commit 60d15e0133
1 changed files with 2 additions and 2 deletions

View File

@ -308,8 +308,8 @@ class REST_Reports_Controller extends REST_Controller {
'value' => $item['value'], 'value' => $item['value'],
'label' => $item['label'], 'label' => $item['label'],
'parent' => $item['parent'] == null ? 0 : $item['parent'], 'parent' => $item['parent'] == null ? 0 : $item['parent'],
'total_items' => $item['total_items'], 'total_items' => intval($item['total_items']),
'total_children' => $item['total_children'], 'total_children' => intval($item['total_children']),
]; ];
}, $data['values']); }, $data['values']);
return new \WP_REST_Response($response, 200); return new \WP_REST_Response($response, 200);