Ignore:
Timestamp:
2013/08/02 13:22:57 (13 years ago)
Author:
Seasoft
Message:

#2322 (セッションのGC処理がエラーとなる)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/module/MDB2/Extended.php

    r20764 r23022  
    4343// +----------------------------------------------------------------------+ 
    4444// 
    45 // $Id: Extended.php,v 1.60 2007/11/28 19:49:34 quipo Exp $ 
     45// $Id: Extended.php 327310 2012-08-27 15:16:18Z danielc $ 
    4646 
    4747/** 
     
    9494    { 
    9595        $query = $this->buildManipSQL($table, $table_fields, $mode, $where); 
    96         if (PEAR::isError($query)) { 
     96        if (MDB2::isError($query)) { 
    9797            return $query; 
    9898        } 
    99         $db =& $this->getDBInstance(); 
    100         if (PEAR::isError($db)) { 
     99        $db = $this->getDBInstance(); 
     100        if (MDB2::isError($db)) { 
    101101            return $db; 
    102102        } 
     
    135135     * @access public 
    136136    */ 
    137     function &autoExecute($table, $fields_values, $mode = MDB2_AUTOQUERY_INSERT, 
     137    function autoExecute($table, $fields_values, $mode = MDB2_AUTOQUERY_INSERT, 
    138138        $where = false, $types = null, $result_class = true, $result_types = MDB2_PREPARE_MANIP) 
    139139    { 
     
    154154            $query = $this->buildManipSQL($table, $keys, $mode, $where); 
    155155 
    156             $db =& $this->getDBInstance(); 
    157             if (PEAR::isError($db)) { 
     156            $db = $this->getDBInstance(); 
     157            if (MDB2::isError($db)) { 
    158158                return $db; 
    159159            } 
    160160            if ($mode == MDB2_AUTOQUERY_SELECT) { 
    161                 $result =& $db->query($query, $result_types, $result_class); 
     161                $result = $db->query($query, $result_types, $result_class); 
    162162            } else { 
    163163                $result = $db->exec($query); 
     
    165165        } else { 
    166166            $stmt = $this->autoPrepare($table, $keys, $mode, $where, $types, $result_types); 
    167             if (PEAR::isError($stmt)) { 
     167            if (MDB2::isError($stmt)) { 
    168168                return $stmt; 
    169169            } 
    170             $result =& $stmt->execute($params, $result_class); 
     170            $result = $stmt->execute($params, $result_class); 
    171171            $stmt->free(); 
    172172        } 
     
    200200    function buildManipSQL($table, $table_fields, $mode, $where = false) 
    201201    { 
    202         $db =& $this->getDBInstance(); 
    203         if (PEAR::isError($db)) { 
     202        $db = $this->getDBInstance(); 
     203        if (MDB2::isError($db)) { 
    204204            return $db; 
    205205        } 
     
    215215        } 
    216216 
    217         if ($where !== false && !is_null($where)) { 
     217        if ((false !== $where) && (null !== $where)) { 
    218218            if (is_array($where)) { 
    219219                $where = implode(' AND ', $where); 
     
    271271     * @access public 
    272272     */ 
    273     function &limitQuery($query, $types, $limit, $offset = 0, $result_class = true, 
     273    function limitQuery($query, $types, $limit, $offset = 0, $result_class = true, 
    274274        $result_wrap_class = false) 
    275275    { 
    276         $db =& $this->getDBInstance(); 
    277         if (PEAR::isError($db)) { 
     276        $db = $this->getDBInstance(); 
     277        if (MDB2::isError($db)) { 
    278278            return $db; 
    279279        } 
    280280 
    281281        $result = $db->setLimit($limit, $offset); 
    282         if (PEAR::isError($result)) { 
     282        if (MDB2::isError($result)) { 
    283283            return $result; 
    284284        } 
    285         $result =& $db->query($query, $types, $result_class, $result_wrap_class); 
    286         return $result; 
     285        return $db->query($query, $types, $result_class, $result_wrap_class); 
    287286    } 
    288287 
     
    303302    function execParam($query, $params = array(), $param_types = null) 
    304303    { 
    305         $db =& $this->getDBInstance(); 
    306         if (PEAR::isError($db)) { 
     304        $db = $this->getDBInstance(); 
     305        if (MDB2::isError($db)) { 
    307306            return $db; 
    308307        } 
     
    314313 
    315314        $stmt = $db->prepare($query, $param_types, MDB2_PREPARE_MANIP); 
    316         if (PEAR::isError($stmt)) { 
     315        if (MDB2::isError($stmt)) { 
    317316            return $stmt; 
    318317        } 
    319318 
    320319        $result = $stmt->execute($params); 
    321         if (PEAR::isError($result)) { 
     320        if (MDB2::isError($result)) { 
    322321            return $result; 
    323322        } 
     
    347346        $param_types = null, $colnum = 0) 
    348347    { 
    349         $db =& $this->getDBInstance(); 
    350         if (PEAR::isError($db)) { 
     348        $db = $this->getDBInstance(); 
     349        if (MDB2::isError($db)) { 
    351350            return $db; 
    352351        } 
     
    359358 
    360359        $stmt = $db->prepare($query, $param_types, $type); 
    361         if (PEAR::isError($stmt)) { 
     360        if (MDB2::isError($stmt)) { 
    362361            return $stmt; 
    363362        } 
     
    394393        $param_types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT) 
    395394    { 
    396         $db =& $this->getDBInstance(); 
    397         if (PEAR::isError($db)) { 
     395        $db = $this->getDBInstance(); 
     396        if (MDB2::isError($db)) { 
    398397            return $db; 
    399398        } 
     
    405404 
    406405        $stmt = $db->prepare($query, $param_types, $types); 
    407         if (PEAR::isError($stmt)) { 
     406        if (MDB2::isError($stmt)) { 
    408407            return $stmt; 
    409408        } 
     
    440439        $param_types = null, $colnum = 0) 
    441440    { 
    442         $db =& $this->getDBInstance(); 
    443         if (PEAR::isError($db)) { 
     441        $db = $this->getDBInstance(); 
     442        if (MDB2::isError($db)) { 
    444443            return $db; 
    445444        } 
     
    452451 
    453452        $stmt = $db->prepare($query, $param_types, $type); 
    454         if (PEAR::isError($stmt)) { 
     453        if (MDB2::isError($stmt)) { 
    455454            return $stmt; 
    456455        } 
     
    496495        $rekey = false, $force_array = false, $group = false) 
    497496    { 
    498         $db =& $this->getDBInstance(); 
    499         if (PEAR::isError($db)) { 
     497        $db = $this->getDBInstance(); 
     498        if (MDB2::isError($db)) { 
    500499            return $db; 
    501500        } 
     
    507506 
    508507        $stmt = $db->prepare($query, $param_types, $types); 
    509         if (PEAR::isError($stmt)) { 
     508        if (MDB2::isError($stmt)) { 
    510509            return $stmt; 
    511510        } 
     
    601600        $fetchmode = MDB2_FETCHMODE_DEFAULT, $force_array = false, $group = false) 
    602601    { 
    603         $db =& $this->getDBInstance(); 
    604         if (PEAR::isError($db)) { 
     602        $db = $this->getDBInstance(); 
     603        if (MDB2::isError($db)) { 
    605604            return $db; 
    606605        } 
     
    612611 
    613612        $stmt = $db->prepare($query, $param_types, $types); 
    614         if (PEAR::isError($stmt)) { 
     613        if (MDB2::isError($stmt)) { 
    615614            return $stmt; 
    616615        } 
     
    645644     * @see prepare(), execute() 
    646645     */ 
    647     function executeMultiple(&$stmt, $params = null) 
    648     { 
     646    function executeMultiple($stmt, $params = null) 
     647    { 
     648        if (MDB2::isError($stmt)) { 
     649            return $stmt; 
     650        } 
    649651        for ($i = 0, $j = count($params); $i < $j; $i++) { 
    650652            $result = $stmt->execute($params[$i]); 
    651             if (PEAR::isError($result)) { 
     653            if (MDB2::isError($result)) { 
    652654                return $result; 
    653655            } 
     
    673675    function getBeforeID($table, $field = null, $ondemand = true, $quote = true) 
    674676    { 
    675         $db =& $this->getDBInstance(); 
    676         if (PEAR::isError($db)) { 
     677        $db = $this->getDBInstance(); 
     678        if (MDB2::isError($db)) { 
    677679            return $db; 
    678680        } 
     
    681683            $seq = $table.(empty($field) ? '' : '_'.$field); 
    682684            $id = $db->nextID($seq, $ondemand); 
    683             if (!$quote || PEAR::isError($id)) { 
     685            if (!$quote || MDB2::isError($id)) { 
    684686                return $id; 
    685687            } 
     
    706708    function getAfterID($id, $table, $field = null) 
    707709    { 
    708         $db =& $this->getDBInstance(); 
    709         if (PEAR::isError($db)) { 
     710        $db = $this->getDBInstance(); 
     711        if (MDB2::isError($db)) { 
    710712            return $db; 
    711713        } 
Note: See TracChangeset for help on using the changeset viewer.