Skip to content

Commit

Permalink
Trace defaults, fixes ThingEngineer#1016 fixes ThingEngineer#1013
Browse files Browse the repository at this point in the history
  • Loading branch information
RivenSkaye committed Jul 24, 2023
1 parent 5159467 commit 295c4c6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MysqliDb.php
Expand Up @@ -216,9 +216,9 @@ class MysqliDb
/**
* Variables for query execution tracing
*/
protected $traceStartQ;
protected $traceEnabled;
protected $traceStripPrefix;
protected $traceStartQ = 0;
protected $traceEnabled = false;
protected $traceStripPrefix = '';
public $trace = array();

/**
Expand Down Expand Up @@ -2329,7 +2329,7 @@ public function _transaction_status_check()
*
* @return MysqliDb
*/
public function setTrace($enabled, $stripPrefix = null)
public function setTrace($enabled, $stripPrefix = '')
{
$this->traceEnabled = $enabled;
$this->traceStripPrefix = $stripPrefix;
Expand All @@ -2350,7 +2350,7 @@ private function _traceGetCaller()
}

return __CLASS__ . "->" . $caller["function"] . "() >> file \"" .
str_replace($this->traceStripPrefix, '', $caller["file"]) . "\" line #" . $caller["line"] . " ";
str_replace($this->traceStripPrefix , '', $caller["file"]) . "\" line #" . $caller["line"] . " ";
}

/**
Expand Down Expand Up @@ -2520,4 +2520,4 @@ private function conditionToSql($operator, $val) {
}
}

// END class
// END class

0 comments on commit 295c4c6

Please sign in to comment.