-
Bug
-
Resolution: Fixed
-
Minor
-
4.2.6, 4.3, 4.4
-
HQ 2024 Sprint I1.3 Moppies
The get_format_string is a format-based method that extends the functionality of the original get_string method.
However, when the function was introduced in MDL-76851, the param list was copied wrong and use string $lang as the third param instead of a boolean $lazyload.
The main problem with the $lazyload is that it changes the method return type, which is not needed for format strings. In this case, the best approach is to remove that parameter altogether.
The good news is that the 4th param is not used anywhere and will throw an error if someone tries to use it. It can be removed without hesitation and there is no need for any formal deprecation process.
This is a screenshot of a VScode showing the error: