R
ragtek
Guest
In XenForo_Model_Node::getNodeHandlersForNodeTypes you check if the handler class for the nodetypeid is set.
If it isn't set, you set the classname as an empty string.
That brings an ugly fatal error
IMHO this shouldn't brake the system.
I know, this will only happen if the add-on deinstall code isn't deleting the existing nodes, but maybe you could use here a "empty alias node handler" class for this?
If it isn't set, you set the classname as an empty string.
PHP:
public function getNodeHandlersForNodeTypes(array $nodeTypeIds)
{
$nodeTypes = $this->getAllNodeTypes();
$output = array();
foreach ($nodeTypeIds AS $nodeTypeId)
{
$class = isset($nodeTypes[$nodeTypeId]) ? $nodeTypes[$nodeTypeId]['handler_class'] : '';
$output[$nodeTypeId] = new $class();
}
return $output;
}
That brings an ugly fatal error
if it's not set.Fatal error: Class '' not found in D:xampp\xampp\htdocs\xf\library\XenForo\Model\Node.php on line 515
IMHO this shouldn't brake the system.
I know, this will only happen if the add-on deinstall code isn't deleting the existing nodes, but maybe you could use here a "empty alias node handler" class for this?
Upvote
0