[Notice] Trying to get property of non-object

GET /index.php/products?category=5

Line 66 in /var/www/clients/client15/web16/web/mysite/code/ProductsPage.php

Source

57  }
58 
59    public function getCategoryName() {
60    $category=$this->getRequest()->getVar('category');
61    if(!$category)
62    {
63      $category=1;
64    }
65 		$file = DataObject::get_one('ProductCategories','ID = '.$category);
66 		return $file->Name;
67 	}
68 
69  function myImagefile($id) {
70    if($id<=0){$id=63;}
71 		$file = DataObject::get_one('File','ID = '.$id);
72 		$img = new Image_Cached($file->Filename);

Trace

Products

Products

Agricultural Solutions Products

We focus on delivering products that are novel and offer sustainable solutions for our customers and the community.

Our development projects and pipeline include differentiated products that provide farmers with the technology they need to grow high quality produce for an ever increasing population.

Product List

Rugby 5G

Cadusafos
CROP: Banana Tomato Sugarcane Ginger Tobacco Citrus

DOSE/ACRE: 10 kg80-100 g per plant in Citrus

Rugby has a broad spectrum of activity. It controls all nematodes and particularly the most dangerous genera widespread in our region.The activity of cadusafos is by contact and through ingestion when the nematode pierce the external cell layers of the root which are exposed to the soil. One of the most important properties of Rugby is that in many plants it does not move systemically from the roots to the upper part and has no residues issue in fruits and vegetables.

DISEASE/PEST: Soil Nematodes