aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_mysqli.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-09 01:12:24 -0700
committerredmatrix <git@macgirvin.com>2016-05-09 01:12:24 -0700
commit6f486a3393fe33db70ef2f1684dd3b79768d1137 (patch)
tree4d6967687dcc9b1c9bbbdb443b0038146c31335a /include/dba/dba_mysqli.php
parent94accd8a4c7500ee4f5c268fe7e84ad3ed9a6675 (diff)
downloadvolse-hubzilla-6f486a3393fe33db70ef2f1684dd3b79768d1137.tar.gz
volse-hubzilla-6f486a3393fe33db70ef2f1684dd3b79768d1137.tar.bz2
volse-hubzilla-6f486a3393fe33db70ef2f1684dd3b79768d1137.zip
prevent recursion in the database driver when debugging is enabled and the system config is not yet loaded - caused by calling get_config and making db calls within the logger function; which we then attempt to log...
Diffstat (limited to 'include/dba/dba_mysqli.php')
-rwxr-xr-xinclude/dba/dba_mysqli.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/dba/dba_mysqli.php b/include/dba/dba_mysqli.php
index 57a7559a1..afd2aa642 100755
--- a/include/dba/dba_mysqli.php
+++ b/include/dba/dba_mysqli.php
@@ -38,7 +38,7 @@ class dba_mysqli extends dba_driver {
if($this->error) {
- logger('dba_mysqli: ERROR: ' . printable($sql) . "\n" . $this->error, LOGGER_NORMAL, LOG_ERR);
+ db_logger('dba_mysqli: ERROR: ' . printable($sql) . "\n" . $this->error, LOGGER_NORMAL, LOG_ERR);
if(file_exists('dbfail.out')) {
file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . "\n" . $this->error . "\n", FILE_APPEND);
}
@@ -46,13 +46,13 @@ class dba_mysqli extends dba_driver {
if(($result === true) || ($result === false)) {
if($this->debug) {
- logger('dba_mysqli: DEBUG: ' . printable($sql) . ' returns ' . (($result) ? 'true' : 'false'), LOGGER_NORMAL,(($result) ? LOG_INFO : LOG_ERR));
+ db_logger('dba_mysqli: DEBUG: ' . printable($sql) . ' returns ' . (($result) ? 'true' : 'false'), LOGGER_NORMAL,(($result) ? LOG_INFO : LOG_ERR));
}
return $result;
}
if($this->debug) {
- logger('dba_mysqli: DEBUG: ' . printable($sql) . ' returned ' . $result->num_rows . ' results.', LOGGER_NORMAL, LOG_INFO);
+ db_logger('dba_mysqli: DEBUG: ' . printable($sql) . ' returned ' . $result->num_rows . ' results.', LOGGER_NORMAL, LOG_INFO);
}
$r = array();
@@ -61,7 +61,7 @@ class dba_mysqli extends dba_driver {
$r[] = $x;
$result->free_result();
if($this->debug) {
- logger('dba_mysqli: ' . printable(print_r($r,true)), LOGGER_NORMAL, LOG_INFO);
+ db_logger('dba_mysqli: ' . printable(print_r($r,true)), LOGGER_NORMAL, LOG_INFO);
}
}
return $r;