Unhandled Error!

Trying to get property of non-object

Document Product
Document type CMS page
Line 1
Exception class Cms_ExecutionException

Code Highlight

<? $genderTest = $product->url_name; if (stripos($genderTest,'womens') !== false) { $sex = 'womens';} else { $sex = 'mens'; }; ?>
 
<div class="header">
    <div class="container">
    	 	<? if($sex == 'womens') { ?>
	    	<div class="womens"><div class="subnav"><ul><? $parent = Shop_Category::create()->find_by_code('womens') ?>
 
							<? } else { ?>
 
				<div class="mens"><div class="subnav"><ul><? $parent = Shop_Category::create()->find_by_code('mens') ?>
 
							<? } ?>
 
# Document Type
1 Product CMS page