-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi,
i want to use firelog but when i load the controller i get this error:
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: libraries/Fire_log.php
Line Number: 111
Below is the code where error comes, in the libraries.
`public function list_files()
{
$list = get_dir_file_info( $this->log_path );
$filtered_list = array();
foreach ($list as $file )
{
$file['attrs'] = '';
$file['suffix'] = '';
if( $file[ 'name' ] == $this->log_file )
{
$file['attrs'] = 'selected="selected"';
}
if( $file[ 'name' ] == $this->today )
{
$file[ 'suffix'] = ' - (' . $this->CI->lang->line( 'fire_log_today' ) . ')';
}
if( $file[ 'name' ] != 'index.html' )
{
array_push( $filtered_list, $file );
}
}
//Order list by file name
usort($filtered_list, create_function('$a, $b', 'return strcmp($b["name"], $a["name"]);'));
return $filtered_list;
}`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels