ErrorException [ Warning ]: Invalid argument supplied for foreach()

APPPATH/views/cart.php [ 27 ]

22 <?php echo Form::open(NULL, array('id'=>'oforml')); 
23 
24 ?>
25     <div class="vizakazali cart">
26         <?php 
27 		foreach ($_SESSION['items'] as $key =>$value) {
28         $item = ORM::factory('Product')->where('id', '=', $key)->find();?>
29 
30         <div class="spastable" id="item<?=$item->id;?>">
31             <div class="spascell spascellimg cart__prod_img_wrap"><img class="img-responsive cart__prod_img" src="<?=URL::base().'media/images/product/'.$item->img;?>" alt=""/></div>
32             <div class="spascell spascellname cart__prod_name">
  1. APPPATH/views/cart.php [ 27 ] » Kohana_Core::error_handler(arguments)

  2. SYSPATH/classes/Kohana/View.php [ 62 ] » include(arguments)

  3. SYSPATH/classes/Kohana/View.php [ 359 ] » Kohana_View::capture(arguments)

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

  5. APPPATH/views/template/v_base.php [ 179 ] » Kohana_View->__toString()

  6. SYSPATH/classes/Kohana/View.php [ 62 ] » include(arguments)

  7. SYSPATH/classes/Kohana/View.php [ 359 ] » Kohana_View::capture(arguments)

  8. SYSPATH/classes/Kohana/Controller/Template.php [ 44 ] » Kohana_View->render()

  9. APPPATH/classes/Controller/Template/Base.php [ 103 ] » Kohana_Controller_Template->after()

  10. SYSPATH/classes/Kohana/Controller.php [ 87 ] » Controller_Template_Base->after()

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

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

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

  14. SYSPATH/classes/Kohana/Request.php [ 997 ] » Kohana_Request_Client->execute(arguments)

  15. DOCROOT/index.php [ 119 ] » Kohana_Request->execute()

Environment