Changeset 2710

Show
Ignore:
Timestamp:
05/28/2008 05:37:15 PM (6 months ago)
Author:
zombor
Message:

Merging r2708.

Location:
releases/2.1.2/system/libraries/drivers/Database
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • releases/2.1.2/system/libraries/drivers/Database/Mysqli.php

    r1931 r2710  
    224224                if ($this->fetch_type == 'fetch_object') 
    225225                { 
    226                         $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     226                        $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    227227                } 
    228228                else 
     
    250250                                // NOTE - The class set by $type must be defined before fetching the result, 
    251251                                // autoloading is disabled to save a lot of stupid overhead. 
    252                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     252                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    253253                        } 
    254254                        else 
     
    264264                        if ($fetch == 'fetch_object') 
    265265                        { 
    266                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     266                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    267267                        } 
    268268                } 
  • releases/2.1.2/system/libraries/drivers/Database/Pdosqlite.php

    r2412 r2710  
    397397                if ($this->fetch_type == PDO::FETCH_OBJ) 
    398398                { 
    399                         $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     399                        $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    400400                } 
    401401                else 
     
    422422                                // NOTE - The class set by $type must be defined before fetching the result, 
    423423                                // autoloading is disabled to save a lot of stupid overhead. 
    424                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     424                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    425425                        } 
    426426                        else 
     
    436436                        if ($fetch == PDO::FETCH_OBJ) 
    437437                        { 
    438                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     438                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    439439                        } 
    440440                } 
  • releases/2.1.2/system/libraries/drivers/Database/Pgsql.php

    r2205 r2710  
    392392                if ($this->fetch_type == 'pg_fetch_object') 
    393393                { 
    394                         $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     394                        $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    395395                } 
    396396                else 
     
    418418                                // NOTE - The class set by $type must be defined before fetching the result, 
    419419                                // autoloading is disabled to save a lot of stupid overhead. 
    420                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     420                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    421421                        } 
    422422                        else 
     
    432432                        if ($fetch == 'pg_fetch_object') 
    433433                        { 
    434                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     434                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    435435                        } 
    436436                }