mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-21 21:35:20 +08:00
oCacher->Get can return NULL
This commit is contained in:
parent
7999894bda
commit
a093eb3231
1 changed files with 4 additions and 4 deletions
|
@ -6,8 +6,8 @@ class RecaptchaPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
NAME = 'reCaptcha',
|
NAME = 'reCaptcha',
|
||||||
AUTHOR = 'SnappyMail',
|
AUTHOR = 'SnappyMail',
|
||||||
URL = 'https://snappymail.eu/',
|
URL = 'https://snappymail.eu/',
|
||||||
VERSION = '2.15',
|
VERSION = '2.16',
|
||||||
RELEASE = '2023-02-22',
|
RELEASE = '2024-03-11',
|
||||||
REQUIRED = '2.26.4',
|
REQUIRED = '2.26.4',
|
||||||
CATEGORY = 'General',
|
CATEGORY = 'General',
|
||||||
LICENSE = 'MIT',
|
LICENSE = 'MIT',
|
||||||
|
@ -64,7 +64,7 @@ class RecaptchaPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
$oCacher = $this->Manager()->Actions()->Cacher();
|
$oCacher = $this->Manager()->Actions()->Cacher();
|
||||||
$sLimit = $oCacher && $oCacher->IsInited() ? $oCacher->Get($this->getCaptchaCacherKey()) : '0';
|
$sLimit = $oCacher && $oCacher->IsInited() ? $oCacher->Get($this->getCaptchaCacherKey()) : '0';
|
||||||
|
|
||||||
if (\strlen($sLimit) && \is_numeric($sLimit)) {
|
if (\is_numeric($sLimit)) {
|
||||||
$iConfigLimit -= (int) $sLimit;
|
$iConfigLimit -= (int) $sLimit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ class RecaptchaPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
if (false === $aResponse['Result']) {
|
if (false === $aResponse['Result']) {
|
||||||
$iLimit = 0;
|
$iLimit = 0;
|
||||||
$sLimut = $oCacher->Get($sKey);
|
$sLimut = $oCacher->Get($sKey);
|
||||||
if (\strlen($sLimut) && \is_numeric($sLimut)) {
|
if (\is_numeric($sLimut)) {
|
||||||
$iLimit = (int) $sLimut;
|
$iLimit = (int) $sLimut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue