ErrorException [ Warning ]: array_rand(): Array is empty

APPPATH/classes/Model/Photos.php [ 146 ]

141 				}
142 			} else
143 			{
144 				$covers = Kohana::list_files($gallerypath . '/cover', array('media/'));
145 				
146 				$arrPhoto = explode('/', array_rand($covers));
147 				$cover = end($arrPhoto);
148 			}
149 		}
150 		
151 		return $cover;
  1. {PHP internal call} » Kohana_Core::error_handler(arguments)

  2. APPPATH/classes/Model/Photos.php [ 146 ] » array_rand(arguments)

  3. APPPATH/classes/Model/Photos.php [ 63 ] » Model_Photos->_cover(arguments)

  4. APPPATH/views/pages/photos.php [ 11 ] » Model_Photos->tracker(arguments)

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

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

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

  8. APPPATH/views/template.php [ 104 ] » Kohana_View->__toString()

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

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

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

  12. APPPATH/classes/Controller/Template.php [ 75 ] » Kohana_Controller_Template->after()

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

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

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

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

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

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

Environment