Don't try to run queries when the database isn't enabled. (#24598)

This commit is contained in:
Charlie Nolan
2024-03-16 09:24:46 -07:00
committed by GitHub
parent b067b8bb04
commit d01d3e4f02
+2
View File
@@ -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++