I recently installed resource manager and when a file is downloaded from it, I receive the below error. This only occurs when I have credits enabled:
I have enabled Credits on some Resource Manager actions and everything appears to work fine, with the exception of these errors I see in the AdminCP when someone downloads a file.
I am certain credits is causing this error as it does not happen if I disable the add-on.
Code:
ErrorException: [E_NOTICE] Undefined offset: 0
src/XF/Mvc/Entity/AbstractCollection.php:68
Stack trace
#0 src/XF/Mvc/Entity/AbstractCollection.php(68): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/alien/pub...', 68, Array)
#1 src/addons/DBTech/Credits/XFRM/Repository/ResourceVersion.php(24): XF\Mvc\Entity\AbstractCollection->offsetGet(0)
#2 src/addons/XFRM/Pub/Controller/ResourceVersion.php(86): DBTech\Credits\XFRM\Repository\ResourceVersion->logDownload(Object(XFRM\Entity\ResourceVersion))
#3 src/XF/Mvc/Dispatcher.php(352): XFRM\Pub\Controller\ResourceVersion->actionDownload(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XFRM:ResourceVe...', 'Download', Object(XF\Mvc\RouteMatch), Object(MMO\ResourceDownloaders\XFRM\Pub\Controller\ResourceVersion), NULL)
#5 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(MMO\ResourceDownloaders\XFRM\Pub\Controller\ResourceVersion), NULL)
#6 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#8 src/XF.php(512): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}
array(4) {
["url"] => string(83) "/files/<my file ID and URL>"
["referrer"] => string(77) "https://www.<my website resource URL>"
["_GET"] => array(1) {
["file"] => string(5) "69114"
}
["_POST"] => array(0) {
}
}
I have enabled Credits on some Resource Manager actions and everything appears to work fine, with the exception of these errors I see in the AdminCP when someone downloads a file.
I am certain credits is causing this error as it does not happen if I disable the add-on.