spamblock_bee 1.3.2: PHP 8 compatibility fix

This commit is contained in:
onli 2021-06-06 11:51:32 +02:00
parent c0f20843d6
commit 797474460e
3 changed files with 7 additions and 4 deletions

View file

@ -1,5 +1,8 @@
Version 1.3.2
* PHP 8 compat fix for saving comments
Version 1.3.1
Added legal gdpr/dsgvo info
* Added legal gdpr/dsgvo info
Version 1.3.0
* Make construct PHP 7 compatible

View file

@ -396,7 +396,7 @@ class serendipity_event_spamblock_bee extends serendipity_event
if ("NORMAL" == $addData['type']) { // only supported for normal comments
// Check for Honey Pot:
$phone = $serendipity['POST']['phone'];
$phone = $serendipity['POST']['phone'] ?? '';
if ($this->useHoneyPot && (!empty($phone) || $phone == '0') ) {
if (mb_strlen($phone) > 40) {
$phone = mb_substr($phone, 0, 40) . '..';
@ -408,7 +408,7 @@ class serendipity_event_spamblock_bee extends serendipity_event
// Check hidden Captcha
if (PLUGIN_EVENT_SPAMBLOCK_SWTCH_OFF != $this->hiddenCaptchaHandle) {
$answer = trim(strtolower($serendipity['POST']['beecaptcha']));
$answer = trim(strtolower($serendipity['POST']['beecaptcha'] ?? ''));
$correctAnswer = $this->getCaptchaAnswer();
$correctAnswer['answer'] = strtolower($correctAnswer['answer']);
$isCorrect = false;

View file

@ -1,2 +1,2 @@
<?php
@define('PLUGIN_SPAMBLOCK_BEE_VERSION', '1.3.1');
@define('PLUGIN_SPAMBLOCK_BEE_VERSION', '1.3.2');