Skip to content

Commit

Permalink
[Jeli 93] Fix deprecated function error with reload core (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
stovak authored Nov 18, 2024
1 parent 27d9fbd commit c7a159b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions search_api_pantheon.module
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ function search_api_pantheon_form_alter(&$form, &$form_state, $form_id) {

function search_api_pantheon_form_submit($form, &$form_state) {
$rl = \Drupal::service("search_api_pantheon.reload");
$messenger = \Drupal::service("messenger");
$rl->reloadServer() ?
drupal_set_message(t('Core reloaded successfully.')) :
drupal_set_message(t('Core reload failed.'), 'error');
$messenger->addStatus(t('Core reloaded successfully.')) :
$messenger->addError(t('Core reload failed.'));
}

0 comments on commit c7a159b

Please sign in to comment.