Skip to content

Commit 295c4c6

Browse files
committed
Trace defaults, fixes #1016 fixes #1013
1 parent 5159467 commit 295c4c6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

MysqliDb.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ class MysqliDb
216216
/**
217217
* Variables for query execution tracing
218218
*/
219-
protected $traceStartQ;
220-
protected $traceEnabled;
221-
protected $traceStripPrefix;
219+
protected $traceStartQ = 0;
220+
protected $traceEnabled = false;
221+
protected $traceStripPrefix = '';
222222
public $trace = array();
223223

224224
/**
@@ -2329,7 +2329,7 @@ public function _transaction_status_check()
23292329
*
23302330
* @return MysqliDb
23312331
*/
2332-
public function setTrace($enabled, $stripPrefix = null)
2332+
public function setTrace($enabled, $stripPrefix = '')
23332333
{
23342334
$this->traceEnabled = $enabled;
23352335
$this->traceStripPrefix = $stripPrefix;
@@ -2350,7 +2350,7 @@ private function _traceGetCaller()
23502350
}
23512351

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

23562356
/**
@@ -2520,4 +2520,4 @@ private function conditionToSql($operator, $val) {
25202520
}
25212521
}
25222522

2523-
// END class
2523+
// END class

0 commit comments

Comments
 (0)