Show
Ignore:
Timestamp:
01/21/2008 10:56:43 AM (12 months ago)
Author:
Geert
Message:

Follow-up to r1772:

  • Kohana::auto_load() must not throw exceptions since that would break other attached auto-loaders (e.g. Swift). Thanks for pointing this out, Woody.
  • Now manually loading drivers which has the added speed benefit.
Files:
1 modified

Legend:

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

    r1772 r1773  
    6969                        $driver = 'Image_'.ucfirst(strtolower($this->config['driver'])).'_Driver'; 
    7070 
    71                         // Manually autoload so that exceptions can be caught 
    72                         Kohana::auto_load($driver); 
     71                        // Manually load so that exceptions can be caught 
     72                        require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 
    7373                } 
    7474                catch (Kohana_Exception $e) 
     
    8080                $this->driver = new $driver($this->config['params']); 
    8181 
    82                 if ( ! ($this->driver instanceof Image_Driver)) 
     82                if ( ! (self::$driver instanceof Image_Driver)) 
    8383                        throw new Kohana_Exception('image.invalid_driver', $driver); 
    8484        }