Unhandled Exception

Message:

Trying to get property of non-object

Location:

/var/www/sm/application/models/product.php on line 32

Stack Trace:

#0 /var/www/sm/laravel/laravel.php(40): Laravel\Error::native(8, 'Trying to get p...', '/var/www/sm/app...', 32)
#1 /var/www/sm/application/models/product.php(32): Laravel\{closure}(8, 'Trying to get p...', '/var/www/sm/app...', 32, Array)
#2 /var/www/sm/application/controllers/new_purchase.php(37): Product::findOrReturnDefault(0, true)
#3 [internal function]: New_Purchase_Controller->get_index()
#4 /var/www/sm/laravel/routing/controller.php(325): call_user_func_array(Array, Array)
#5 /var/www/sm/laravel/routing/controller.php(285): Laravel\Routing\Controller->response('index', Array)
#6 /var/www/sm/laravel/routing/controller.php(165): Laravel\Routing\Controller->execute('index', Array)
#7 /var/www/sm/laravel/routing/route.php(153): Laravel\Routing\Controller::call('new_purchase@in...', Array)
#8 /var/www/sm/laravel/routing/route.php(124): Laravel\Routing\Route->response()
#9 /var/www/sm/laravel/laravel.php(165): Laravel\Routing\Route->call()
#10 /var/www/sm/public/index.php(36): require('/var/www/sm/lar...')
#11 {main}