From d01d3e4f027ffa1dcae365b410107b67b1c45ff8 Mon Sep 17 00:00:00 2001 From: Charlie Nolan Date: Sat, 16 Mar 2024 09:24:46 -0700 Subject: [PATCH] Don't try to run queries when the database isn't enabled. (#24598) --- code/controllers/subsystem/SSdbcore.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/controllers/subsystem/SSdbcore.dm b/code/controllers/subsystem/SSdbcore.dm index 88624dc784ce..03d147e9aaca 100644 --- a/code/controllers/subsystem/SSdbcore.dm +++ b/code/controllers/subsystem/SSdbcore.dm @@ -382,6 +382,8 @@ SUBSYSTEM_DEF(dbcore) * * log_error - Do we want to log errors this creates? Disable this if you are running sensitive queries where you dont want errors logged in plain text (EG: Auth token stuff) */ /datum/db_query/proc/warn_execute(async = TRUE, log_error = TRUE) + if(!GLOB.configuration.database.enabled) + return . = Execute(async, log_error) if(!.) SSdbcore.total_errors++