Changeset 8 for trunk/lib/DB.inc.php


Ignore:
Timestamp:
Aug 30, 2005 9:32:53 PM (19 years ago)
Author:
scdev
Message:

checking isset($this) on self-instanciating function calls in App and DB.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/DB.inc.php

    r7 r8  
    8585    function setParam($params)
    8686    {
    87         if (!is_a($this, 'DB')) {
     87        if (!isset($this) || !is_a($this, 'DB')) {
    8888            $this =& DB::getInstance();
    8989        }
     
    108108    function getParam($param)
    109109    {
    110         if (!is_a($this, 'DB')) {
     110        if (!isset($this) || !is_a($this, 'DB')) {
    111111            $this =& DB::getInstance();
    112112        }
     
    129129    function connect()
    130130    {
    131         if (!is_a($this, 'DB')) {
     131        if (!isset($this) || !is_a($this, 'DB')) {
    132132            $this =& DB::getInstance();
    133133        }
     
    175175    function close()
    176176    {
    177         if (!is_a($this, 'DB')) {
     177        if (!isset($this) || !is_a($this, 'DB')) {
    178178            $this =& DB::getInstance();
    179179        }
     
    196196    function getDBH()
    197197    {
    198         if (!is_a($this, 'DB')) {
     198        if (!isset($this) || !is_a($this, 'DB')) {
    199199            $this =& DB::getInstance();
    200200        }
     
    231231        static $_query_count = 0;
    232232       
    233         if (!is_a($this, 'DB')) {
     233        if (!isset($this) || !is_a($this, 'DB')) {
    234234            $this =& DB::getInstance();
    235235        }
     
    277277    function tableExists($table, $use_cached_results=true)
    278278    {   
    279         if (!is_a($this, 'DB')) {
     279        if (!isset($this) || !is_a($this, 'DB')) {
    280280            $this =& DB::getInstance();
    281281        }
     
    311311    function columnExists($table, $columns, $strict=true, $use_cached_results=true)
    312312    {   
    313         if (!is_a($this, 'DB')) {
     313        if (!isset($this) || !is_a($this, 'DB')) {
    314314            $this =& DB::getInstance();
    315315        }
Note: See TracChangeset for help on using the changeset viewer.