Skip to content

Commit ba6a55b

Browse files
fix(sql): migrate interpolated queries to prepared statements
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
1 parent 29888db commit ba6a55b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function audit_poller_bottom() {
154154
$retention = read_config_option('audit_retention');
155155

156156
if ($retention > 0) {
157-
db_execute('DELETE FROM audit_log WHERE event_time < FROM_UNIXTIME(' . (time() - ($retention * 86400)) . ')');
157+
db_execute_prepared('DELETE FROM audit_log WHERE event_time < FROM_UNIXTIME(?)', array(time() - ($retention * 86400)));
158158
$rows = db_affected_rows();
159159
cacti_log('NOTE: Purged ' . $rows . ' Audit Log Records from Cacti', false, 'POLLER');
160160
}

0 commit comments

Comments
 (0)