Fixed [E_NOTICE] Undefined index: app_id src/XF/ConnectedAccount/Provider/Facebook.php:26

DragonByte Tech

Well-known member
Affected version
2.0.9
We used to have the Facebook connected account provider enabled, but it has since been disabled. I have confirmed that the button does not appear anywhere, however we still receive daily server error logs:

#0 src/XF/ConnectedAccount/Provider/Facebook.php(26): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/dbtech/pu...', 26, Array)
#1 src/XF/ConnectedAccount/Provider/AbstractProvider.php(102): XF\ConnectedAccount\Provider\Facebook->getOAuthConfig(Object(XF\Entity\ConnectedAccountProvider))
#2 src/XF/Pub/Controller/Register.php(63): XF\ConnectedAccount\Provider\AbstractProvider->handleAuthorization(Object(DBTech\eCommerce\XF\Pub\Controller\Register), Object(XF\Entity\ConnectedAccountProvider), '/')
#3 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Register->actionConnectedAccount(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'ConnectedAccoun...', 'html', Object(XF\Mvc\ParameterBag), '', Object(DBTech\eCommerce\XF\Pub\Controller\Register), NULL)
#5 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#7 src/XF.php(328): XF\App->run()
#8 index.php(13): XF::runApp('XF\\Pub\\App')
#9 {main}
array(4) {
["url"] => string(46) "/register/connected-accounts/facebook/?setup=1"
["referrer"] => bool(false)
["_GET"] => array(1) {
["setup"] => string(1) "1"
}
["_POST"] => array(0) {
}
}


Fillip
 
Looks like people may have bookmarks to it or someone is deliberately hitting it. We need to actually check whether the connected account provider is usable and if it isn't, bail out. Sorted :)
 
Back
Top Bottom