1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
Daniel 2022-02-21 11:57:11 -03:00
parent 054fabec6f
commit bbffba7cea

View file

@ -85,7 +85,7 @@ class sqlDAL
try { try {
$audit->exec(@$debug[1]['function'], @$debug[1]['class'], $preparedStatement, $formats, json_encode($values), User::getId()); $audit->exec(@$debug[1]['function'], @$debug[1]['class'], $preparedStatement, $formats, json_encode($values), User::getId());
} catch (Exception $exc) { } catch (Exception $exc) {
_log_error($exc->getTraceAsString()); log_error($exc->getTraceAsString());
} }
} }
} }
@ -99,18 +99,18 @@ class sqlDAL
return false; return false;
} }
if (!sqlDAL::eval_mysql_bind($stmt, $formats, $values)) { if (!sqlDAL::eval_mysql_bind($stmt, $formats, $values)) {
_log_error("[sqlDAL::writeSql] eval_mysql_bind failed: values and params in stmt don't match ({$preparedStatement}) with formats ({$formats})"); log_error("[sqlDAL::writeSql] eval_mysql_bind failed: values and params in stmt don't match ({$preparedStatement}) with formats ({$formats})");
return false; return false;
} }
try { try {
$stmt->execute(); $stmt->execute();
} catch (Exception $exc) { } catch (Exception $exc) {
_log_error($exc->getTraceAsString()); log_error($exc->getTraceAsString());
_log_error('Error in writeSql stmt->execute: '.$preparedStatement); log_error('Error in writeSql stmt->execute: '.$preparedStatement);
} }
if ($stmt->errno !== 0) { if ($stmt->errno !== 0) {
_log_error('Error in writeSql : (' . $stmt->errno . ') ' . $stmt->error . ", SQL-CMD:" . $preparedStatement); log_error('Error in writeSql : (' . $stmt->errno . ') ' . $stmt->error . ", SQL-CMD:" . $preparedStatement);
$stmt->close(); $stmt->close();
return false; return false;
} }