Unhandled Error!

Trying to get property of non-object

Document shop:product_list
Document type CMS partial
Line 65
Exception class Cms_ExecutionException

Code Highlight

																		shop_products_categories.shop_category_id, 
																		shop_products.smathersbranson_first_tier_ranking, 
																		shop_products.smathersbranson_second_tier_ranking, 
																		shop_products.name 
														FROM shop_products, shop_products_categories 
														WHERE shop_products.enabled = 1 AND shop_products.id = shop_products_categories.shop_product_id 
														AND shop_products_categories.shop_category_id = "'.$category2->id.'" '.$orderBy);
			$products = array();
			$skipNumberCounter = 0;
			foreach($productsArrayDB1 as $product){
				if(Db_DbHelper::scalar('SELECT COUNT(shop_product_id) AS count FROM shop_products_categories WHERE shop_product_id = :productID AND shop_category_id = :categoryID', array('productID'=>$product['shop_product_id'], 'categoryID'=>$category1->id)) == '1'){
					$productCount++;
					if($skipNumberCounter < $skipNumber){
# Document Type
2 shop:product_list CMS partial
1 Needlepoint Belts and Accessories CMS page