PaulB
Well-known member
- Affected version
- 2.2.1
Line 285 of
src/XF/Error.php
:
PHP:
$args[] = sprintf('%.*G', $arg);
*
isn't a valid precision value. In PHP 7.4.11, this is silently ignored, and the result is the string "G"
. In PHP 8.0 RC2, this results in an exception.
Code:
$ php7.4 -r 'printf("%.*G\n", 0.1 * 10);'
G
$ php8.0 -r 'printf("%.*G\n", 0.1 * 10);'
PHP Fatal error: Uncaught ValueError: Precision must be an integer in Command line code:1
Stack trace:
#0 Command line code(1): printf()
#1 {main}
thrown in Command line code on line 1