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

APPPATH/classes/model/product.php [ 30 ]

25 
26 
27         
28         
29         $model = new self;
30         foreach($data as $k => $row){
31             $model->setId($k);
32             $model->setName($row[0]);
33             $model->setDescription($row[1]);
34             $model->setPrice_pln($row[2]);
35             $model->setImage($row[3]);       
  1. APPPATH/classes/model/product.php [ 30 ] » Kohana_Core::error_handler(arguments)

  2. APPPATH/classes/controller/pages.php [ 42 ] » Model_Product->getById(arguments)

  3. {PHP internal call} » Controller_Pages->action_oferta_produkt()

  4. SYSPATH/classes/kohana/request/client/internal.php [ 118 ] » ReflectionMethod->invoke(arguments)

  5. SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  6. SYSPATH/classes/kohana/request.php [ 1138 ] » Kohana_Request_Client->execute(arguments)

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

Environment