• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed DnsBl cache variable error

Affected version
2.0.0 Beta 1

Liam W

Well-known member
#1
I'm getting this when someone registers:

Code:
ErrorException: Undefined property: XF\DataRegistry::$dnsBlCache src/XF/Spam/Checker/AbstractDnsBl.php:10
Stack trace:

Code:
#0 /home/nginx/domains/lw-addons.net/public/src/XF/Spam/Checker/AbstractDnsBl.php(10): XF::handlePhpError(8, 'Undefined prope...', '/home/nginx/dom...', 10, Array)
#1 /home/nginx/domains/lw-addons.net/public/src/XF/Spam/Checker/ProjectHoneyPot.php(19): XF\Spam\Checker\AbstractDnsBl->checkIp('yjekubtebwei.%s...', false)
#2 /home/nginx/domains/lw-addons.net/public/src/XF/Spam/UserChecker.php(11): XF\Spam\Checker\ProjectHoneyPot->check(Object(XFRM\XF\Entity\User), Array)
#3 /home/nginx/domains/lw-addons.net/public/src/XF/Service/User/Registration.php(151): XF\Spam\UserChecker->check(Object(XFRM\XF\Entity\User))
#4 /home/nginx/domains/lw-addons.net/public/src/XF/Pub/Controller/Register.php(339): XF\Service\User\Registration->checkForSpam()
#5 /home/nginx/domains/lw-addons.net/public/src/XF/Mvc/Dispatcher.php(232): XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag))
#6 /home/nginx/domains/lw-addons.net/public/src/XF/Mvc/Dispatcher.php(85): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', 'json', Object(XF\Mvc\ParameterBag), '')
#7 /home/nginx/domains/lw-addons.net/public/src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 /home/nginx/domains/lw-addons.net/public/src/XF/App.php(1771): XF\Mvc\Dispatcher->run()
#9 /home/nginx/domains/lw-addons.net/public/src/XF.php(319): XF\App->run()
#10 /home/nginx/domains/lw-addons.net/public/index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
 

Chris D

XenForo developer
Staff member
#2
I fixed this while confirming it...
If you go to the line indicated in the file indicated change that line to:
PHP:
$dnsBlCache = $this->app()->registry()['dnsBlCache'] ?: [];