Skip to content

Commit

Permalink
Don't try to run queries when the database isn't enabled. (ParadiseSS…
Browse files Browse the repository at this point in the history
  • Loading branch information
FunnyMan3595 authored Mar 16, 2024
1 parent b067b8b commit d01d3e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/controllers/subsystem/SSdbcore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down

0 comments on commit d01d3e4

Please sign in to comment.