• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Error after upgrade

Affected version
2.0
#1
An exception occurred: [Error] Call to a member function canView() on null in src/addons/XFMG/Entity/MediaItem.php on line 94
  1. XFMG\Entity\MediaItem->canView() in src/addons/XFMG/Entity/Comment.php at line 49
  2. XFMG\Entity\Comment->canView() in src/XF/Mvc/Entity/AbstractCollection.php at line 298
  3. XF\Mvc\Entity\AbstractCollection->XF\Mvc\Entity\{closure}()
  4. array_filter() in src/XF/Mvc/Entity/AbstractCollection.php at line 167
  5. XF\Mvc\Entity\AbstractCollection->filter() in src/XF/Mvc/Entity/AbstractCollection.php at line 299
  6. XF\Mvc\Entity\AbstractCollection->filterViewable() in src/addons/XFMG/Widget/LatestComments.php at line 26
  7. XFMG\Widget\LatestComments->render() in src/XF/Template/Templater.php at line 1506
  8. XF\Template\Templater->widgetPosition() in internal_data/code_cache/templates/l2/s23/public/xfmg_gallery_wrapper.php at line 73
  9. XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 1230
  10. XF\Template\Templater->renderTemplate() in src/XF/Template/Templater.php at line 796
  11. XF\Template\Templater->applyWrappedTemplate() in src/XF/Template/Templater.php at line 1286
  12. XF\Template\Templater->renderTemplate() in src/XF/Template/Template.php at line 24
  13. XF\Template\Template->render() in src/XF/Mvc/Renderer/Html.php at line 48
  14. XF\Mvc\Renderer\Html->renderView() in src/XF/Mvc/Dispatcher.php at line 332
  15. XF\Mvc\Dispatcher->renderView() in src/XF/Mvc/Dispatcher.php at line 303
  16. XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 44
  17. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1879
  18. XF\App->run() in src/XF.php at line 328
  19. XF::runApp() in index.php at line 13
 
#2
Code:
#0 src/addons/XFMG/Entity/Comment.php(49): XFMG\Entity\MediaItem->canView(NULL)
#1 src/XF/Mvc/Entity/AbstractCollection.php(298): XFMG\Entity\Comment->canView()
#2 [internal function]: XF\Mvc\Entity\AbstractCollection->XF\Mvc\Entity\{closure}(Object(XFMG\Entity\Comment))
#3 src/XF/Mvc/Entity/AbstractCollection.php(167): array_filter(Array, Object(Closure))
#4 src/XF/Mvc/Entity/AbstractCollection.php(299): XF\Mvc\Entity\AbstractCollection->filter(Object(Closure))
#5 src/addons/XFMG/Widget/LatestComments.php(26): XF\Mvc\Entity\AbstractCollection->filterViewable()
#6 src/XF/Template/Templater.php(1506): XFMG\Widget\LatestComments->render()
#7 internal_data/code_cache/templates/l2/s24/public/xfmg_gallery_wrapper.php(73): XF\Template\Templater->widgetPosition('xfmg_gallery_wr...', Array)
#8 src/XF/Template/Templater.php(1230): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array)
#9 src/XF/Template/Templater.php(796): XF\Template\Templater->renderTemplate('xfmg_gallery_wr...', Array, false)
#10 src/XF/Template/Templater.php(1286): XF\Template\Templater->applyWrappedTemplate('\n\n\n\t\n\n\t\n\n\n\n\n\n\t\n...')
#11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('xfmg_media_inde...', Array)
#12 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#13 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XFMG:Media\\Inde...', 'public:xfmg_med...', Array)
#14 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(1879): XF\Mvc\Dispatcher->run()
#17 src/XF.php(328): XF\App->run()
#18 index.php(13): XF::runApp('XF\\Pub\\App')
#19 {main}


Code:
array(4) {
  ["url"] => string(13) "/forum/media/"
  ["referrer"] => string(32) "https://www.wizardfox.net/forum/"
  ["_GET"] => array(1) {
    ["/forum/media/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}