Unhandled Error!

Trying to get property of non-object

Document breadcrumbs
Document type CMS page block
Line 4
Exception class Cms_ExecutionException

Code Highlight

<?
$bigest = 0;
$current = null;
foreach( $product->categories as $cat){
//	echo("number:".count($cat->get_parents()));
	foreach($cat->get_parents() as $c){
	//	echo("->".$c->name);
	}
	if($bigest < count($cat->get_parents())){
		$current = $cat;
		$bigest = count($cat->get_parents());
 
	//	echo("b:".$bigest." - ");
# Document Type
3 breadcrumbs CMS page block
2 layout:header CMS partial
1 inner CMS template