We apologize for the instability of composr.app and appreciate your patience. We are working on the statistics addon and trying to find an optimal way to store and render data. Unfortunately, we have yet to find a solution that can handle the traffic (and therefore, tens of millions of statistical records) of composr.app. We're working hard on one.
#5480 - Rewrite do_lang and do_lang_tempcode to not ignore params when previous params are null
It is done the way it is for performance reasons. Looping over 3 inputs for every language string referenced is not trivial when thousands may be. Let's say there's 1000 language strings being referenced, and the difference between checking 1 vs 3 parameters is a microsecond. That's 1 millisecond. Let's say our performance budget is 200 milliseconds.. that's 0.5% of our performance budget just for this one tiny thing that can be avoided by not providing parameters incorrectly.
I think an alternative then should be a new automated test if there isn't one to check for these cases where a null parameter is passed before a non-null one. There are instances of this in the v11 codebase.
Fundamentally it's impossible to do fully with linting, as most cases of this will be happening when variables are being used rather than static values.
What would work is in dev mode checking the parameters are valid at the start of the function. Then it's much harder for us to miss, during our basic development cycles.
So are you suggesting a dev mode clause within the do_lang / do_lang_comcode functions where if a parameter has null and a later parameter does not, we warn_exit about that?
What would work is in dev mode checking the parameters are valid at the start of the function. Then it's much harder for us to miss, during our basic development cycles.