Unhandled Error!

Trying to get property of non-object

Document Needlepoint Wallet Fob Belt and Hat Coasters Shirts and Accessory Themes
Document type CMS page
Line 217
Exception class Cms_ExecutionException

Code Highlight

									echo $themeLinks;
								}
 
								//LEVEL 2 THEME
								if($depth[0] == 'themes' && ($depth[1] != 'null' && !is_numeric($depth[1])) && ($depth[2] == 'null' || is_numeric($depth[2]))){
									$themeCategory = Shop_Category::create()->find_by_url_name($depth[1]);
									$productsQuery = Db_DbHelper::queryArray('SELECT shop_product_id FROM shop_products_categories WHERE shop_category_id=:id', array('id'=>$themeCategory->id));
									$counter = 0;
									$allOtherCategories = array();
									$allOtherCategoriesCounter = 0;
 
									while($counter < count($productsQuery)){
										$otherCategories = Db_DbHelper::queryArray('SELECT shop_category_id FROM shop_products_categories WHERE shop_product_id = :productID AND shop_category_id <> :categoryID', array('productID'=>$productsQuery[$counter], 'categoryID'=>$themeCategory->id));
# Document Type
1 Needlepoint Wallet Fob Belt and Hat Coasters Shirts and Accessory Themes CMS page