Show
Ignore:
Timestamp:
01/27/2008 11:23:40 AM (12 months ago)
Author:
Shadowhand
Message:

Fixing a potential E_WARNING that could come up in Log::write() when the log directory is unwritable. Thanks, benedikt.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/core/Log.php

    r1334 r1828  
    5353                if ( ! is_dir($filename) OR ! is_writable($filename)) 
    5454                { 
    55                         ob_get_level() AND ob_clean(); 
     55                        // Disable errors 
     56                        $ER = error_reporting(0); 
     57 
     58                        // Clear the buffer 
     59                        ob_get_level() and ob_clean(); 
     60 
     61                        // Enable errors 
     62                        error_reporting($ER); 
     63 
    5664                        exit(Kohana::lang('core.cannot_write_log')); 
    5765                }