Not a bug ErrorException: [E_WARNING] Undefined array key "" src/XF/Mvc/Entity/Manager.php:584

MattW

Well-known member
Affected version
2.2.13
Code:
Server error log
ErrorException: [E_WARNING] Undefined array key "" src/XF/Mvc/Entity/Manager.php:584
Generated by: Unknown account Jun 20, 2023 at 10:47 AM
Stack trace
#0 src/XF/Mvc/Entity/Manager.php(584): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/admin/dom...', 584)
#1 src/XF/Mvc/Entity/Finder.php(1434): XF\Mvc\Entity\Manager->hydrateFromGrouped(Array, Array)
#2 src/XF/Mvc/Entity/Manager.php(214): XF\Mvc\Entity\Finder->fetch()
#3 src/XF/Repository/Node.php(146): XF\Mvc\Entity\Manager->findByIds('XF:Forum', Array, Array)
#4 src/XF/Repository/Node.php(20): XF\Repository\Node->loadNodeTypeDataForNodes(Object(XF\Mvc\Entity\ArrayCollection))
#5 src/XF/Pub/Controller/Forum.php(54): XF\Repository\Node->getNodeList()
#6 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Forum->actionList(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'List', Object(XF\Mvc\RouteMatch), Object(SV\RedisCache\XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\RedisCache\XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(1) "/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Seem to be getting quite a few of these logged in the ACP.

Rocky8, Litespeed, PHP8.1
 
ErrorException: [E_WARNING] Undefined array key "" in src/XF/Mvc/Entity/Manager.php at line 584
  1. XF::handlePhpError() insrc/XF/Mvc/Entity/Manager.php at line 584
  2. XF\Mvc\Entity\Manager->hydrateFromGrouped() insrc/XF/Mvc/Entity/Finder.php at line 1434
  3. XF\Mvc\Entity\Finder->fetch() insrc/XF/Repository/Node.php at line 19
  4. XF\Repository\Node->getNodeList() insrc/XF/Pub/Controller/Forum.php at line 54
  5. XF\Pub\Controller\Forum->actionList() insrc/XF/Mvc/Dispatcher.php at line 352
  6. XF\Mvc\Dispatcher->dispatchClass() insrc/XF/Mvc/Dispatcher.php at line 259
  7. XF\Mvc\Dispatcher->dispatchFromMatch() insrc/XF/Mvc/Dispatcher.php at line 115
  8. XF\Mvc\Dispatcher->dispatchLoop() insrc/XF/Mvc/Dispatcher.php at line 57
  9. XF\Mvc\Dispatcher->run() in src/XF/App.php at line2487
  10. XF\App->run() in src/XF.php at line 524
  11. XF::runApp() in index.php at line 20

Had this again just now. Marking all forums as read on my site.
 
The only thing that I can see that would cause this is if the pertinent entity was missing table from its structure. I can't see why that would be the case unless an add-on was erroneously overwriting it, and I haven't been able to reproduce this locally.
 
The only thing that I can see that would cause this is if the pertinent entity was missing table from its structure. I can't see why that would be the case unless an add-on was erroneously overwriting it, and I haven't been able to reproduce this locally.
Is there anything specific I could search for in the addons that might indicate this could be the cause?
 
If it is an add-on, presumably it extends the \XF\Entity\Node and/or \XF\Entity\Forum classes or has an entity_structure code listener which either has those classes as hints or no hint at all.
 
I know this has been marked as Not A Bug, but I'm still getting these errors, and have no idea what's causing them:

Code:
ErrorException: [E_WARNING] Undefined array key "" src/XF/Mvc/Entity/Manager.php:584
Generated by: Unknown account Jan 23, 2024 at 9:05 AM
Stack trace
#0 src/XF/Mvc/Entity/Manager.php(584): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/mattwserv...', 584)
#1 src/XF/Mvc/Entity/Finder.php(1434): XF\Mvc\Entity\Manager->hydrateFromGrouped(Array, Array)
#2 src/XF/Mvc/Entity/Manager.php(214): XF\Mvc\Entity\Finder->fetch()
#3 src/XF/Repository/Node.php(146): XF\Mvc\Entity\Manager->findByIds('XF:Forum', Array, Array)
#4 src/XF/Repository/Node.php(20): XF\Repository\Node->loadNodeTypeDataForNodes(Object(XF\Mvc\Entity\ArrayCollection))
#5 src/XF/Pub/Controller/Forum.php(54): XF\Repository\Node->getNodeList()
#6 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Forum->actionList(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'List', Object(XF\Mvc\RouteMatch), Object(SV\RedisCache\XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\RedisCache\XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(1) "/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Since I can't reproduce this or see how it could occur, and nobody else has reported it, I'm inclined to believe it's not a bug in the core. If it still occurs on the default style with all add-ons disabled and you're comfortable providing server access, feel free to flag me down in a ticket and I'll take a closer look.

And if anybody else runs into this, please let me know and I'll re-open the report.
 
I have also been experiencing this issue.

This is the stack trace with add ons disabled.


  • ErrorException: [E_WARNING] Undefined array key "report"
  • src/XF/Spam/AbstractChecker.php:39




#0 src/XF/Spam/AbstractChecker.php(39): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nginx/dom...', 39)
#1 src/XF/Service/Conversation/MessageManager.php(78): XF\Spam\AbstractChecker->getFinalDecision()
#2 src/XF/Service/Conversation/Replier.php(113): XF\Service\Conversation\MessageManager->checkForSpam()
#3 src/XF/Service/Conversation/Replier.php(123): XF\Service\Conversation\Replier->checkForSpam()
#4 src/XF/Service/Conversation/Replier.php(129): XF\Service\Conversation\Replier->finalSetup()
#5 src/XF/Service/ValidateAndSavableTrait.php(19): XF\Service\Conversation\Replier->_validate()
#6 src/XF/Pub/Controller/Conversation.php(518): XF\Service\Conversation\Replier->validate(NULL)
#7 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Conversation->actionAddReply(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Conversation', 'AddReply', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Conversation), NULL)
#9 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Conversation), NULL)
#10 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}
 
Back
Top Bottom