TeamSpeak Fixed ErrorException: [E_NOTICE] Trying to access array offset on value of type null src\addons\NF\TeamSpeak\Helper.php:202

Affected version
2.1.0

SeToY

Well-Known Member
Whenever I open the TeamSpeak viewer:


  • ErrorException: [E_NOTICE] Trying to access array offset on value of type null
  • src\addons\NF\TeamSpeak\Helper.php:202

Code:
Stack trace
#0 src\addons\NF\TeamSpeak\Helper.php(202): XF::handlePhpError(8, '[E_NOTICE] Tryi...', 'D:\\inetpub\\wwwr...', 202, Array)
#1 src\addons\NF\TeamSpeak\Helper.php(1452): NF\TeamSpeak\Helper->addUuidToGroup('1YQmQBkDv57hbmw...', ' ', '77691')
#2 src\addons\NF\TeamSpeak\XF\Pub\Controller\Account.php(70): NF\TeamSpeak\Helper->setServerGroupsByUserId(1)
#3 src\XF\Mvc\Dispatcher.php(350): NF\TeamSpeak\XF\Pub\Controller\Account->actionTeamSpeak(Object(XF\Mvc\ParameterBag))
#4 src\XF\Mvc\Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'Teamspeak', Object(XF\Mvc\RouteMatch), Object(SV\SignupAbuseBlocking\XF\Pub\Controller\Account), NULL)
#5 src\XF\Mvc\Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SignupAbuseBlocking\XF\Pub\Controller\Account), NULL)
#6 src\XF\Mvc\Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src\XF\App.php(2190): XF\Mvc\Dispatcher->run()
#8 src\XF.php(391): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

Doesn't happen for other ppl, though. Maybe because they have the actual TS Viewer permission set to "No", so the viewer itself is not visible for them.

The addUuidToGroup call is weird, as I suspect the first parameter to be the TS group identifier and the second parameter (77691) being the XF user id and the user has nothing to do with my XF user (1)...
 
Last edited:

SeToY

Well-Known Member
Still having this error which results in subsequent errors in conjunction with other permission-based add-ons because saving fails (or user group promotions).
Code:
#0 src\addons\NF\TeamSpeak\Helper.php(202): XF::handlePhpError(8, '[E_NOTICE] Tryi...', 'D:\\inetpub\\wwwr...', 202, Array)
#1 src\addons\NF\TeamSpeak\Helper.php(1452): NF\TeamSpeak\Helper->addUuidToGroup('1YQmQBkDv57hbmw...', ' ', '77691')
#2 src\addons\NF\TeamSpeak\XF\Entity\User.php(52): NF\TeamSpeak\Helper->setServerGroupsByUserId(1)
#3 src\addons\SV\UserEssentials\XF\Entity\User.php(471): NF\TeamSpeak\XF\Entity\User->_postSave()
#4 src\XF\Mvc\Entity\Entity.php(1219): SV\UserEssentials\XF\Entity\User->_postSave()
#5 src\XF\Service\User\UserGroupChange.php(191): XF\Mvc\Entity\Entity->save(false, false)
#6 src\XF\Service\User\UserGroupChange.php(45): XF\Service\User\UserGroupChange->applyUserGroupChanges(1, Array, Array, '60')
#7 src\XF\Entity\UserGroupPromotion.php(27): XF\Service\User\UserGroupChange->addUserGroupChange(1, 'ugPromotion6', '60')
#8 src\XF\Repository\UserGroupPromotion.php(115): XF\Entity\UserGroupPromotion->promote(Object(SV\SignupAbuseBlocking\XF\Entity\User))
#9 src\XF\Cron\UserGroupPromotion.php(37): XF\Repository\UserGroupPromotion->updatePromotionsForUser(Object(SV\SignupAbuseBlocking\XF\Entity\User), Array, Array)
#10 [internal function]: XF\Cron\UserGroupPromotion::runPromotions(Array)
#11 src\XF\Admin\Controller\CronEntry.php(112): call_user_func(Array, Array)
#12 src\XF\Mvc\Dispatcher.php(350): XF\Admin\Controller\CronEntry->actionRun(Object(XF\Mvc\ParameterBag))
#13 src\XF\Mvc\Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:CronEntry', 'Run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\CronEntry), NULL)
#14 src\XF\Mvc\Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\CronEntry), NULL)
#15 src\XF\Mvc\Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src\XF\App.php(2191): XF\Mvc\Dispatcher->run()
#17 src\XF.php(391): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}

Will anything be done about that after nearly 4 months?
 

NixFifty

Administrator
Staff member
Mostly super busy.

What version of TeamSpeak server are you both using for this to happen on?
 

SeToY

Well-Known Member
Another one:

Code:
[LIST]
[*]ErrorException: [E_NOTICE] Trying to access array offset on value of type bool
[*]src\addons\NF\TeamSpeak\Entity\Sync.php:49
[*]Generated by: User
[*]16 Dec 2020 at 14:05
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src\addons\NF\TeamSpeak\Entity\Sync.php(49): XF::handlePhpError(8, '[E_NOTICE] Tryi...', 'D:\\inetpub\\wwwr...', 49, Array)
#1 src\XF\Mvc\Entity\Entity.php(1648): NF\TeamSpeak\Entity\Sync->_postDelete()
#2 src\addons\NF\TeamSpeak\XF\Pub\Controller\Account.php(160): XF\Mvc\Entity\Entity->delete()
#3 src\XF\Mvc\Dispatcher.php(350): NF\TeamSpeak\XF\Pub\Controller\Account->actionTeamSpeakUnlink(Object(XF\Mvc\ParameterBag))
#4 src\XF\Mvc\Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'TeamspeakUnlink', Object(XF\Mvc\RouteMatch), Object(SV\SignupAbuseBlocking\XF\Pub\Controller\Account), NULL)
#5 src\XF\Mvc\Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SignupAbuseBlocking\XF\Pub\Controller\Account), NULL)
#6 src\XF\Mvc\Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src\XF\App.php(2300): XF\Mvc\Dispatcher->run()
#8 src\XF.php(488): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}
 

NixFifty

Administrator
Staff member
The addUuidToGroup call is weird, as I suspect the first parameter to be the TS group identifier and the second parameter (77691) being the XF user id and the user has nothing to do with my XF user (1)...
The line underneath it gets your TeamSpeak identities by using your user ID. The line you're looking at uses your TeamSpeak UUID and client database ID to give you the groups you need.

I've fixed the issue in the original message which looks to have been caused by orphaned groups as well as the other stack traces you posted.

Thanks!
 
Top