Fixed ErrorException: Trying to get property of non-object - Missing image / format error

Neal

Well-known member
Affected version
2.0.0 Beta 2
I get the following error and I think it's when someone tries to view a media file that doesn't exist, or, as in my case as I started the site again, the image is something else (The image it refers to is now a YouTube video embed and named something else):

Code:
Server error log

ErrorException: Trying to get property of non-object src/addons/XFMG/Pub/Controller/Media.php:167
Generated by: Unknown account 16 September 2017 at 07:05

Stack trace

#0 /home/*/public_html/src/addons/XFMG/Pub/Controller/Media.php(167): XF::handlePhpError(8, 'Trying to get p...', '/home/talkgeek/...', 167, Array)
#1 /home/*/public_html/src/XF/Mvc/Dispatcher.php(232): XFMG\Pub\Controller\Media->actionFull(Object(XF\Mvc\ParameterBag))
#2 /home/*/public_html/src/XF/Mvc/Dispatcher.php(85): XF\Mvc\Dispatcher->dispatchClass('XFMG:Media', 'Full', 'html', Object(XF\Mvc\ParameterBag), 'xfmg')
#3 /home/*/public_html/src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 /home/*/public_html/src/XF/App.php(1777): XF\Mvc\Dispatcher->run()
#5 /home/*/public_html/src/XF.php(320): XF\App->run()
#6 /home/*/public_html/index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}

Request state

array(4) {
  ["url"] => string(35) "/media/ghost-recon-wildlands.6/full"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Yeah this is about trying to access the "full" version of a media item that doesn't have an attachment (so like a YouTube embed as you identified).

This is sorted for the next release (it will just return a 404).
 
Top Bottom