#648: AgaviRotatingFileLoggerAppender fails if no log-file exists
-----------------------------------------------------+----------------------
 Reporter:  André Fiedler <[EMAIL PROTECTED]>  |       Owner:  dominik          
                      
     Type:  defect                                   |      Status:  new        
                            
 Priority:  high                                     |   Milestone:  0.11.1     
                            
Component:  logging                                  |     Version:  0.11.0RC7  
                            
 Severity:  normal                                   |    Keywords:  
AgaviRotatingFileLoggerAppender logging
-----------------------------------------------------+----------------------
 got this error message:

 {{{
 Warning: Invalid argument supplied for foreach() in
 agavi/logging/AgaviRotatingFileLoggerAppender.class.php on line 83
 }}}

 Workaround:

 change this:

 {{{
 $files = array();
 foreach(glob($dir . $prefix . '*-*-*' . $suffix) as $filename) {
         $files[] = $filename;
 }
 }}}

 to this:

 {{{
 $files = array();
 $found_files = glob($dir . $prefix . '*-*-*' . $suffix);
 if($found_files) {
         foreach($found_files as $filename) {
                 $files[] = $filename;
         }
 }
 }}}

 ciao SunboX

-- 
Ticket URL: <http://trac.agavi.org/ticket/648>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to