ErrorException [ Warning ]: count(): Parameter must be an array or an object that implements Countable

APPPATH/views/new/single.php [ 7 ]

 2     $curr_link = $base.'/new';
 3 ?>
 4 <div class="body container">
 5 <?php require_once APPPATH . "views/_sidebar.php"; ?>
 6     <div id="content" class="books">
 7         <?php if(!empty($featured) && count($featured)>0){?>
 8         <div id="content-head">
 9             <h1 class="title"><span></span><?=$featured->title?></h1>
10         </div>
11         <div id="content-body">
12 <?php   if (isset($featured->author) && !empty($featured->author)) {
  1. APPPATH/views/new/single.php [ 7 ] » Kohana_Core::error_handler()

  2. APPPATH/views/_template.php [ 3 ] » require_once(arguments)

  3. SYSPATH/classes/Kohana/View.php [ 61 ] » include(arguments)

  4. SYSPATH/classes/Kohana/View.php [ 348 ] » Kohana_View::capture()

  5. SYSPATH/classes/Kohana/View.php [ 228 ] » Kohana_View->render()

  6. APPPATH/classes/Controller/New.php [ 36 ] » Kohana_View->__toString()

  7. SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_New->action_view()

  8. {PHP internal call} » Kohana_Controller->execute()

  9. SYSPATH/classes/Kohana/Request/Client/Internal.php [ 97 ] » ReflectionMethod->invoke()

  10. SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request()

  11. SYSPATH/classes/Kohana/Request.php [ 986 ] » Kohana_Request_Client->execute()

  12. DOCROOT/index.php [ 109 ] » Kohana_Request->execute()

Environment