Slim Application Error

The application could not run because of the following error:

Details:

Message: Trying to get property of non-object
File: /var/www/html/detail.php
Line: 107

Stack Trace:

#0 /var/www/html/detail.php(107): Slim::handleErrors(8, 'Trying to get p...', '/var/www/html/d...', 107, Array)
#1 [internal function]: detail('0000316.html')
#2 /var/www/html/Slim/Route.php(392): call_user_func_array('detail', Array)
#3 /var/www/html/Slim/Slim.php(1047): Slim_Route->dispatch()
#4 /var/www/html/detail.php(185): Slim->run()
#5 {main}