1.2.1145. Sprintf Format Compilation¶
The sprintf() format used yields an error. A format is a %
pourcent character, followed by a letter.
Some letters are not allowed: a, i, j, k, l, m, n, p, q, r, t, v, w, y, z, A, B, C, D, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, Y, Z
.
This applies to printf(), sprintf(), vprintf(), vfprintf(), vsprintf(), sscanf(), fscanf()
<?php
printf('\%we3e\\', 123);
//Unknown format specifier \w\\
?>
See also https://www.php.net/manual/en/function.sprintf.php.
1.2.1145.2. Connex PHP features¶
1.2.1145.2.1. Suggestions¶
Fix the format
1.2.1145.2.2. Specs¶
Short name |
Structures/SprintfFormatCompilation |
Rulesets |
|
Exakat since |
2.4.5 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |