diff --git a/mailpoet/lib/Subscription/Pages.php b/mailpoet/lib/Subscription/Pages.php index abdbfa494e..b0b2b737dd 100644 --- a/mailpoet/lib/Subscription/Pages.php +++ b/mailpoet/lib/Subscription/Pages.php @@ -328,7 +328,10 @@ class Pages { switch ($this->action) { case self::ACTION_CAPTCHA: - $captchaSessionId = $this->data['captcha_session_id'] ?? null; + $captchaSessionId = + (isset($this->data['captcha_session_id']) && is_string($this->data['captcha_session_id'])) + ? $this->data['captcha_session_id'] + : null; if (!$captchaSessionId) { return false; }