Show
Ignore:
Timestamp:
07/20/2008 08:34:36 PM (4 months ago)
Author:
Shadowhand
Message:

Replacing file_exists calls with is_file and is_dir, where possible.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Captcha.php

    r3160 r3168  
    105105                        self::$config['background'] = str_replace('\\', '/', realpath($config['background'])); 
    106106 
    107                         if ( ! file_exists(self::$config['background'])) 
     107                        if ( ! is_file(self::$config['background'])) 
    108108                                throw new Kohana_Exception('captcha.file_not_found', self::$config['background']); 
    109109                } 
     
    116116                        foreach ($config['fonts'] as $font) 
    117117                        { 
    118                                 if ( ! file_exists(self::$config['fontpath'].$font)) 
     118                                if ( ! is_file(self::$config['fontpath'].$font)) 
    119119                                        throw new Kohana_Exception('captcha.file_not_found', self::$config['fontpath'].$font); 
    120120                        }