remove unneccessary quoting and escaping
This commit is contained in:
parent
86b04d0e6f
commit
a2a3bda2e1
|
@ -458,14 +458,11 @@ class Logger
|
|||
syslog( self::$syslogPriorities[$level], $message );
|
||||
if ( $level <= $this->databaseLevel )
|
||||
{
|
||||
$dbFile = is_null($file)?'NULL':"'".dbEscape($file)."'";
|
||||
$dbLine = is_null($line)?'NULL':dbEscape($line);
|
||||
|
||||
try {
|
||||
global $dbConn;
|
||||
$sql = "INSERT INTO Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( ?, ?, ?, ?, ?, ?, ?, ? )";
|
||||
$stmt = $dbConn->prepare( $sql );
|
||||
$result = $stmt->execute( array( sprintf( "%d.%06d", $time['sec'], $time['usec'] ), dbEscape($this->id), getmypid(), dbEscape($level), dbEscape($code), dbEscape($string), $dbFile, $dbLine ) );
|
||||
$result = $stmt->execute( array( sprintf( "%d.%06d", $time['sec'], $time['usec'] ), $this->id, getmypid(), $level, $code, $string, $file, $line ) );
|
||||
} catch(PDOException $ex) {
|
||||
$this->databaseLevel = self::NOLOG;
|
||||
Fatal( "Can't write log entry '$sql': ". $ex->getMessage() );
|
||||
|
|
Loading…
Reference in New Issue