Show
Ignore:
Timestamp:
05/16/08 07:45:01 (8 months ago)
Author:
tinyau
Message:

Fixed #350 - get_row() return the incorrect class type. Thanks MellerTime for the patch.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/classes/databaseconnection.php

    r1708 r1727  
    463463            /* Called expecting specific class return type */ 
    464464            $class_name= func_get_arg( 2 ); 
    465             $this->set_fetch_mode( PDO::FETCH_CLASS ); 
    466             $this->set_fetch_class( $class_name ); 
    467         } 
     465        } 
     466        else { 
     467            $class_name= 'QueryRecord'; 
     468        } 
     469 
     470        $this->set_fetch_mode( PDO::FETCH_CLASS ); 
     471        $this->set_fetch_class( $class_name ); 
     472 
    468473        if ( $this->query( $query, $args ) ) { 
    469474            return $this->pdo_statement->fetch();