From 10f77055746711d5a624b8e0e253a29b1a5d8808 Mon Sep 17 00:00:00 2001 From: nkoporec Date: Fri, 10 Mar 2023 07:44:57 +0100 Subject: [PATCH] Fix phpstan errors --- .../views/field/SocialGroupViewsBulkOperationsBulkForm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php b/modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php index bbf2c4648a3..71c60aa99c1 100644 --- a/modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php +++ b/modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php @@ -138,8 +138,9 @@ public function viewsForm(array &$form, FormStateInterface $form_state): void { // Render select all results checkbox. if (!empty($wrapper['select_all'])) { + $total_results = is_array($this->tempStoreData) ? $this->tempStoreData['total_results'] : 0; $wrapper['select_all']['#title'] = $this->t('Select / unselect all @count members across all the pages', [ - '@count' => $this->tempStoreData['total_results'] ? ' ' . $this->tempStoreData['total_results'] : '', + '@count' => ' ' . $total_results, ]); // Styling attributes for the select box. $form['header'][$this->options['id']]['select_all']['#attributes']['class'][] = 'form-no-label';