Commit 40127071 authored by Dan Chadwick's avatar Dan Chadwick Committed by Szczepan Musial
Browse files

Issue #3210110 by DanChadwick: Logging a spam attempt triggers Warning:...

Issue #3210110 by DanChadwick: Logging a spam attempt triggers Warning: htmlspecialchars() expects parameter 1 to be string, array given in Drupal\Component\Utility\Html::escape()
parent 82b58a41
Loading
Loading
Loading
Loading
+3 −3
Changes for spamicide.module: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -107,11 +107,11 @@ function spamicide_validate(array $form, FormStateInterface &$form_state) {
    $spamicide_settings->set('spamicide_counter', $counter);
    $spamicide_settings->save();
    \Drupal::logger('spamicide')->notice(
      t('%form_id post blocked by Spamicide module: their IP address is "%ipaddress".',
      '%form_id post blocked by Spamicide module: their IP address is "%ipaddress".',
      [
          '%form_id' => $form['form_id'],
       '%form_id' => $form['#form_id'],
       '%ipaddress' => Drupal::request()->getClientIp(),
        ])
      ]
    );
  }