Unhandled Error!

Trying to get property of non-object

Document /modules/banners/models/banners_set.php
Document type PHP document
Line 76
Exception class Phpr_PhpException

Code Highlight

	}
 
	public static function get($name = null)
	{
		$model = self::create()->where('name = ?', $name)->find_all();
 
		if ($model->banners->count > 0) 
			return $model;
 
		return array();
	}
 
	public static function find_banner($banner_id, $throw_exception = true)
# Call Stack Code Document Line
22 Banners_Set::get('Store Header Banners') /modules/banners/init/custom_helpers.php 8
21 banners_get_set('Store Header Banners') /modules/cms/classes/cms_controller.php(383) : eval()'d code 6
20 eval(()) /modules/cms/classes/cms_controller.php 383
19 Cms_Controller->evalWithException('?><? $banner_set = isset($banner_set) ? $banner_set : ''; $width = isset($width) ? $width : 'auto'; $height = isset($height) ? $height : 'auto'; $absolute = isset($absolute) ? $absolute : false; $images = banners_get_set($banner_set); ?> <? if($images): ?> <? $rotate = $images->rotate == 1 ? true : false; ?> <? if($rotate): ?> <div class="flexslider banner"> <ul class="slides"> <? endif; ?> <?php foreach($images->banners as $key => $image): ?> <? if($rotate): ?> <li> <? endif; ?> <? if($image->url_link): ?> <a href="<?= $image->url_link; ?>"> <? endif; ?> <img src="<?= ($absolute) ? site_url() : ''; ?><?= $image->images->getThumbnailPath($width, $height, false) ?>" alt="<?= $image->images->description; ?>" /> <? if($image->url_link): ?> </a> <? endif; ?> <? if($rotate): ?> </li> <? endif; ?> <? endforeach; ?> <? if($rotate): ?> </ul> </div> <? endif; ?> <? endif; ?>', 'CMS partial', 'site:get_banner', array(1) [banner_set => 'Store Header Banners']) /modules/cms/classes/cms_controller.php 1020
18 Cms_Controller->render_partial('site:get_banner', array(1) [banner_set => 'Store Header Banners']) /modules/cms/classes/cms_controller.php(383) : eval()'d code 5
17 eval(()) /modules/cms/classes/cms_controller.php 383
16 Cms_Controller->evalWithException('?><section class="usps clearfix"> <div class="container wide"> <? $this->render_partial('site:get_banner', array( 'banner_set'=>'Store Header Banners' )); ?> </div> </section>', 'CMS partial', 'site:usps', array(0)) /modules/cms/classes/cms_controller.php 1020
15 Cms_Controller->render_partial('site:usps') /modules/cms/classes/cms_controller.php(383) : eval()'d code 34
14 eval(()) /modules/cms/classes/cms_controller.php 383
13 Cms_Controller->evalWithException('?><header> <div class="container narrow"> <div class="row"> <div class="span9 logo"> <a href="<?= root_url();?>" class="brand hide-text pull-left"><?= site_setting('site_name') ?></a> </div> <div class="span20 offset1"> <ul class="align-right meta"> <? if(site_setting('contact_number')): ?><li class="phone-number">Call: <?= site_setting('contact_number') ?></li><? endif; ?> <? $this->render_partial('site:list_pages', array('subpages'=>$this->page->navigation_root_pages())) ?> <? if(!$this->customer): ?> <li><a href="<?= root_url('/log-in');?>">Login/Register</a></li> <? else: ?> <li><a href="<?= root_url('/log-out/');?>">Log Out</a></li> <? endif; ?> </ul> <div class="row"> <div class="span10 search"> <form method="get" action="<?= root_url('/search-results/');?>"> <input name="query" type="text" autocomplete="off" placeholder="Search" value="<?= isset($query) ? $query : null ?>"/> <input type="hidden" name="records" value="140"/> <button class="btn btn-small"><i class="icon-search"></i></button> </form> </div> <div class="span9 offset1" id="mini-cart"> <?php $this->render_partial('checkout:mini-cart'); ?> </div> </div> </div> </div> </div> <?php $this->render_partial('site:navigation'); ?> </header> <?php $this->render_partial('site:usps'); ?> ', 'CMS partial', 'site:header', array(0)) /modules/cms/classes/cms_controller.php 1020
12 Cms_Controller->render_partial('site:header') /modules/cms/classes/cms_controller.php(383) : eval()'d code 16
11 eval(()) /modules/cms/classes/cms_controller.php 383
10 Cms_Controller->evalWithException('?><!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <base href="<?php echo Phpr::$request->getRootUrl().Phpr::$request->getSubdirectory() ?>" /> <?php $this->render_partial('site:meta'); $this->render_head(); ?> <title><?php echo h($this->page->title); ?> | <?= site_setting('site_name') ?> | <?= site_setting('site_tag') ?></title> </head> <body class=<?php echo h($this->page->title); ?>> <div class="pagecontainer"> <div class="container wide headerarea <?= $this->page->title = 'Home' ? 'Home' : ''?>"> <?php $this->render_partial('site:header'); ?> </div> <div class="container wide pagearea"> <?php $this->render_page(); ?> </div> <div class="container wide footerarea"> <?php $this->render_partial('site:footer'); ?> </div> </div> <div class="container wide footerarea"> <?php $this->render_partial('site:footermeta'); ?> <?php $this->render_partial('site:mobileprompt'); ?> </div> <? if ( $this->page->id == 26 || $this->page->id == 28 ) : ?> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-5101560504d76623"></script> <? endif; ?> <script type="text/javascript"> var __lc = {}; __lc.license = 5754611; (function() { var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true; lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.livechatinc.com/tracking.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s); })(); </script> <script type="text/javascript"> (function(a,e,f,g,b,c,d){a[b]=a[b]||function(){ (a[b].q=a[b].q||[]).push(arguments)}; c=e.createElement(f);d=e.getElementsByTagName(f)[0];c.async=1;c.src=g; d.parentNode.insertBefore(c,d) })(window,document,"script","//cdn.app.exitmonitor.com/em.js","em"); em('set', 'campaign', '54f5dacc37643400100b0000'); </script> </body> </html>', 'CMS template', 'Default') /modules/cms/classes/cms_controller.php 211
9 Cms_Controller->open(object(Cms_Page), array(1) [0 => 'mens-accessories']) /controllers/application.php 72
8 Application->On404(())
7 call_user_func_array(array(2) [0 => object(Application), 1 => 'On404'], array(0)) /phproad/modules/phpr/classes/phpr_controller.php 170
6 Phpr_Controller->executeAction('On404', array(0)) /phproad/modules/phpr/classes/phpr_controller.php 84
5 Phpr_Controller->_run('On404', array(0)) /phproad/modules/phpr/classes/phpr_response.php 64
4 Phpr_Response->open404(()) /phproad/modules/phpr/classes/phpr_response.php 37
3 Phpr_Response->open('/category/mens-accessories') /phproad/system/phproad.php 31
2 include('/var/www/vhosts/time4outdoors.com/httpdocs/phproad/system/phproad.php') /boot.php 114
1 require_once('/var/www/vhosts/time4outdoors.com/httpdocs/boot.php') /index.php 3