Changeset 2708

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

Fixing #572.

Location:
trunk/system/libraries/drivers/Database
Files:
4 modified

Legend:

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

    r2593 r2708  
    393393                if ($this->fetch_type == 'mssql_fetch_object') 
    394394                { 
    395                         $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     395                        $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    396396                } 
    397397                else 
     
    424424                                // NOTE - The class set by $type must be defined before fetching the result, 
    425425                                // autoloading is disabled to save a lot of stupid overhead. 
    426                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     426                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    427427                        } 
    428428                        else 
     
    438438                        if ($fetch == 'mssql_fetch_object') 
    439439                        { 
    440                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     440                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    441441                        } 
    442442                } 
  • trunk/system/libraries/drivers/Database/Mysqli.php

    r2232 r2708  
    227227                if ($this->fetch_type == 'fetch_object') 
    228228                { 
    229                         $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     229                        $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    230230                } 
    231231                else 
     
    258258                                // NOTE - The class set by $type must be defined before fetching the result, 
    259259                                // autoloading is disabled to save a lot of stupid overhead. 
    260                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     260                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    261261                        } 
    262262                        else 
     
    272272                        if ($fetch == 'fetch_object') 
    273273                        { 
    274                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     274                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    275275                        } 
    276276                } 
  • trunk/system/libraries/drivers/Database/Pdosqlite.php

    r2593 r2708  
    386386                if ($this->fetch_type == PDO::FETCH_OBJ) 
    387387                { 
    388                         $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     388                        $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    389389                } 
    390390                else 
     
    416416                                // NOTE - The class set by $type must be defined before fetching the result, 
    417417                                // autoloading is disabled to save a lot of stupid overhead. 
    418                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     418                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    419419                        } 
    420420                        else 
     
    430430                        if ($fetch == PDO::FETCH_OBJ) 
    431431                        { 
    432                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     432                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    433433                        } 
    434434                } 
  • trunk/system/libraries/drivers/Database/Pgsql.php

    r2593 r2708  
    396396                if ($this->fetch_type == 'pg_fetch_object') 
    397397                { 
    398                         $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     398                        $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    399399                } 
    400400                else 
     
    427427                                // NOTE - The class set by $type must be defined before fetching the result, 
    428428                                // autoloading is disabled to save a lot of stupid overhead. 
    429                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     429                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    430430                        } 
    431431                        else 
     
    441441                        if ($fetch == 'pg_fetch_object') 
    442442                        { 
    443                                 $type = class_exists($type, FALSE) ? $type : 'stdClass'; 
     443                                $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 
    444444                        } 
    445445                }