mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
19272bc3e8
TranslateCap returned the result of gsub directly, and gsub returns the string plus the number of substitutions. Whenever TranslateCap is the last argument of a call, that count is passed along as an extra argument. The common case is showNotification(msg, notifyType, ...), which is called with just the message in about 49 places in the core. Those all pass notifyType = 1 instead of nil, so the notification is rendered with a numeric type rather than the intended default. 71 call sites in total have TranslateCap in trailing position. Wrapping the call in parentheses truncates it to one value. The string itself is unchanged, and nothing reads the second value.