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

APPPATH/views/include/header.php [ 143 ]

138               <fieldset>
139            
140                 <select id="search-category" class="option-drop" name="search-category">
141                   <option value="none">Tutte le categorie</option>
142                  
143                   <?PHP foreach($categorie as $categoria): ?>
144                        <option value="<?PHP echo $categoria['root']['id']; ?>">■ <?PHP echo ucfirst(strtolower($categoria['root']['nome'])) ?></option>   
145                           <?PHP if(count($categoria['childs']) > 0):?>
146                               <?PHP foreach($categoria['childs'] as $child): ?>
147                                 <option value="<?PHP echo $categoria['root']['id']?>-<?PHP echo $child['id']; ?>">&nbsp;&nbsp;&nbsp;- <?PHP echo ucfirst(strtolower( $child['nome'])) ?></option>
148                               <?PHP endforeach; ?>
  1. APPPATH/views/include/header.php [ 143 ] » 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/home.php [ 76 ] » 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/View.php [ 236 ] » Kohana_View->render()

  9. SYSPATH/classes/Kohana/Response.php [ 169 ] » Kohana_View->__toString()

  10. APPPATH/classes/Controller/Home.php [ 179 ] » Kohana_Response->body(arguments)

  11. SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Home->action_index()

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

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

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

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

  16. DOCROOT/index.php [ 118 ] » Kohana_Request->execute()

Environment

In evidenza