Bug fix for #26

Make sure debug log does not output integers, but only mysqli_result object in db_helper
Couple other fixes
This commit is contained in:
2018-09-26 10:39:38 -04:00
parent 881bf29ee5
commit dde7409f01
5 changed files with 116 additions and 92 deletions

View File

@ -1271,7 +1271,7 @@ class db_helper
"Executing: $this->query_type\t" .
"SQL: {$errmsg}" . PHP_EOL, FILE_APPEND);
if ($errno == E_DEBUG && $this->result && LOG_LEVEL == E_DEBUG) {
if ($errno == E_DEBUG && $this->result && LOG_LEVEL == E_DEBUG && is_a($this->result, 'mysqli_result')) {
file_put_contents(realpath(LOG_PATH . '/db.debug'), print_r($this->result, true), FILE_APPEND);
}
elseif ($errno == E_ERROR && $this->c->error) {

View File

@ -125,6 +125,7 @@ function getValue($xml, $path, $starting = null, $keep = false)
*/
function FileDetection($filename)
{
$name = [];
$name['base_name'] = basename($filename);
// print "\tCheck if exists".PHP_EOL;
if (!file_exists($filename)) {