diff --git a/modules/custom/activity_basics/activity_basics.install b/modules/custom/activity_basics/activity_basics.install index 0b1db20c69b..68b5f4eb7ed 100644 --- a/modules/custom/activity_basics/activity_basics.install +++ b/modules/custom/activity_basics/activity_basics.install @@ -55,7 +55,7 @@ function activity_basics_update_8103() : void { $activity_bundle_entity = $config->get('third_party_settings.activity_logger.activity_bundle_entity'); $config->clear('third_party_settings.activity_logger.activity_bundle_entity'); - $bundle_entity = explode('.', $activity_bundle_entity); + $bundle_entity = explode('.', $activity_bundle_entity ?? ""); $activity_bundle_entity_new = $bundle_entity[0] . '-' . $bundle_entity[1]; $activity_bundle_entities = [$activity_bundle_entity_new => $activity_bundle_entity_new]; diff --git a/modules/custom/download_count/download_count.module b/modules/custom/download_count/download_count.module index 4a9c43ba161..d1fde547a90 100755 --- a/modules/custom/download_count/download_count.module +++ b/modules/custom/download_count/download_count.module @@ -47,7 +47,7 @@ function download_count_file_access(EntityInterface $entity, $operation, Account } // Validate file has extension that should be counted, if not return. - $extensions = explode(' ', mb_strtolower(trim($config->get('download_count_excluded_file_extensions')))); + $extensions = explode(' ', mb_strtolower(trim($config->get('download_count_excluded_file_extensions') ?? ""))); $extension = mb_strtolower(pathinfo($entity->getFilename(), PATHINFO_EXTENSION)); if (in_array($extension, $extensions, TRUE)) { return; diff --git a/modules/custom/social_path_manager/social_path_manager.module b/modules/custom/social_path_manager/social_path_manager.module index 4c90e0aba06..b0a17bf0054 100644 --- a/modules/custom/social_path_manager/social_path_manager.module +++ b/modules/custom/social_path_manager/social_path_manager.module @@ -251,7 +251,7 @@ function _social_path_manager_update_alias(EntityInterface $entity, $op, $bulk = $entity_language = $entity->language()->getId(); // Prevent adding alias for default tab. - $source_parts = explode('/', $path['source']); + $source_parts = explode('/', $path['source'] ?? ""); if (end($source_parts) === $suffix) { continue; } diff --git a/modules/social_features/social_follow_user/social_follow_user.install b/modules/social_features/social_follow_user/social_follow_user.install index cb6df15b75b..82301322ff9 100644 --- a/modules/social_features/social_follow_user/social_follow_user.install +++ b/modules/social_features/social_follow_user/social_follow_user.install @@ -113,7 +113,7 @@ function social_follow_user_uninstall(): void { if (!empty($config->getRawData())) { $pages = $config->get('visibility.request_path.pages'); - $pages = explode("\r\n", $pages); + $pages = explode("\r\n", $pages ?? ""); foreach ($pages as $delta => $page) { if (in_array($page, $paths)) { diff --git a/modules/social_features/social_group/modules/social_group_invite/src/Form/SocialBulkGroupInvitation.php b/modules/social_features/social_group/modules/social_group_invite/src/Form/SocialBulkGroupInvitation.php index da961e86264..be5040ad909 100644 --- a/modules/social_features/social_group/modules/social_group_invite/src/Form/SocialBulkGroupInvitation.php +++ b/modules/social_features/social_group/modules/social_group_invite/src/Form/SocialBulkGroupInvitation.php @@ -502,7 +502,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { * List of emails to invite . */ private function getSubmittedEmails(FormStateInterface $form_state) { - return array_map('trim', array_unique(explode("\r\n", trim($form_state->getValue('email_address'))))); + return array_map('trim', array_unique(explode("\r\n", trim($form_state->getValue('email_address') ?? "")))); } /** diff --git a/modules/social_features/social_landing_page/social_landing_page.module b/modules/social_features/social_landing_page/social_landing_page.module index 27286e5c795..1efcbe8f790 100644 --- a/modules/social_features/social_landing_page/social_landing_page.module +++ b/modules/social_features/social_landing_page/social_landing_page.module @@ -75,7 +75,7 @@ function social_landing_page_field_widget_block_field_default_form_alter(&$eleme // Grab the id. $id = $block_settings['#attributes']['id']; - $items = explode('-', $id); + $items = explode('-', $id ?? ""); // Generate the new state name. // We use block id, to get all the parent names diff --git a/modules/social_features/social_post/modules/social_post_album/src/Element/SocialPostAlbumManagedFile.php b/modules/social_features/social_post/modules/social_post_album/src/Element/SocialPostAlbumManagedFile.php index ac441df33fd..61c629f990c 100644 --- a/modules/social_features/social_post/modules/social_post_album/src/Element/SocialPostAlbumManagedFile.php +++ b/modules/social_features/social_post/modules/social_post_album/src/Element/SocialPostAlbumManagedFile.php @@ -24,7 +24,7 @@ class SocialPostAlbumManagedFile extends ManagedFile { */ public static function uploadAjaxCallback(&$form, FormStateInterface &$form_state, Request $request) { $response = parent::uploadAjaxCallback($form, $form_state, $request); - $parents = explode('/', $request->query->get('element_parents')); + $parents = explode('/', $request->query->get('element_parents') ?? ""); return $response->addCommand(new InvokeCommand( '#edit-' . str_replace('_', '-', $parents[0]) . '-wrapper', diff --git a/modules/social_features/social_profile/src/SocialProfileTrait.php b/modules/social_features/social_profile/src/SocialProfileTrait.php index 33751b75647..db47d06fb19 100644 --- a/modules/social_features/social_profile/src/SocialProfileTrait.php +++ b/modules/social_features/social_profile/src/SocialProfileTrait.php @@ -60,7 +60,7 @@ public function getUserIdsFromName($name, $count, $suggestion_format = SOCIAL_PR case SOCIAL_PROFILE_SUGGESTIONS_FULL_NAME: case SOCIAL_PROFILE_SUGGESTIONS_ALL: if ($this->useFullName()) { - $strings = explode(' ', $name); + $strings = explode(' ', $name ?? ""); if (count($strings) > 1) { $query->where("CONCAT(TRIM(fn.field_profile_first_name_value), ' ', TRIM(ln.field_profile_last_name_value)) LIKE :full_name", [ diff --git a/modules/social_features/social_swiftmail/social_swiftmail.module b/modules/social_features/social_swiftmail/social_swiftmail.module index bdb3e8963b1..db5d38178c8 100644 --- a/modules/social_features/social_swiftmail/social_swiftmail.module +++ b/modules/social_features/social_swiftmail/social_swiftmail.module @@ -30,7 +30,7 @@ function social_swiftmail_preprocess_swiftmailer(array &$variables) { $secondary = $colors['brand-secondary']; $accent = $colors['brand-accent']; $link = $colors['brand-link']; - $border_radius = Xss::filter(theme_get_setting('border_radius', $theme_id)); + $border_radius = Xss::filter(theme_get_setting('border_radius', $theme_id) ?? ""); // Add variables to send to the html template. $variables['logo'] = $logo; @@ -117,7 +117,7 @@ function social_swiftmail_preprocess_swiftmailer(array &$variables) { } $disabled_greeting_keys = $social_swiftmail_config->get("disabled_user_greeting_keys"); - $disabled_greeting_keys = explode("\r\n", $disabled_greeting_keys); + $disabled_greeting_keys = explode("\r\n", $disabled_greeting_keys ?? ""); $replace = [ '@display_name' => $display_name, ];