Ignore:
Timestamp:
May 9, 2009 4:07:10 PM (4 years ago)
Author:
alec
Message:
  • Fix session handling on non-session SQL query error (#1485734)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_mdb2.php

    r2449 r2463  
    179179 
    180180  /** 
     181   * Connection state checker 
     182   * 
     183   * @param  boolean  True if in connected state 
     184   */ 
     185  function is_connected() 
     186    { 
     187    return PEAR::isError($this->db_handle) ? false : true; 
     188    } 
     189 
     190 
     191  /** 
    181192   * Execute a SQL query 
    182193   * 
     
    188199  function query() 
    189200    { 
     201    if (!$this->is_connected()) 
     202      return NULL; 
     203     
    190204    $params = func_get_args(); 
    191205    $query = array_shift($params); 
     
    361375  function _fetch_row($result, $mode) 
    362376    { 
    363     if ($result === FALSE || PEAR::isError($result)) 
     377    if ($result === FALSE || PEAR::isError($result) || !$this->is_connected()) 
    364378      return FALSE; 
    365379 
Note: See TracChangeset for help on using the changeset viewer.