Prevent type error when non-integer input passed to getNumberingPath()

This commit is contained in:
Kijin Sung 2026-01-28 20:46:30 +09:00
parent c1942080e7
commit 09919944a7

View file

@ -875,6 +875,7 @@ function getDestroyXeVars($vars)
*/ */
function getNumberingPath($no, int $size = 3): string function getNumberingPath($no, int $size = 3): string
{ {
$no = intval($no);
$mod = pow(10, $size); $mod = pow(10, $size);
$output = sprintf('%0' . $size . 'd/', intval($no % $mod)); $output = sprintf('%0' . $size . 'd/', intval($no % $mod));
if($no >= $mod) if($no >= $mod)