Show
Ignore:
Timestamp:
04/25/2008 02:09:17 PM (7 months ago)
Author:
zombor
Message:

Fixing #572.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Database/Mysql.php

    r2353 r2575  
    413413                // NOTE - The class set by $type must be defined before fetching the result, 
    414414                // autoloading is disabled to save a lot of stupid overhead. 
    415                 if ($this->fetch_type == 'mysql_fetch_object') 
    416                 { 
    417                         $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     415                if ($this->fetch_type == 'mysql_fetch_object' AND $object === TRUE) 
     416                { 
     417                        if (is_string($type)) 
     418                        { 
     419                                $loaded = Kohana::auto_load($type); 
     420                                $this->return_type = $loaded ? $type : 'stdClass'; 
     421                        } 
     422                        else 
     423                        { 
     424                                $this->return_type = 'stdClass'; 
     425                        } 
    418426                } 
    419427                else