Consider the dispatcher for image functions:
|
if (str_starts_with(PHP_VERSION, "8.3.")) { |
|
require_once __DIR__ . '/8.2/image.php'; |
|
} |
If a machine is running PHP 8.3, the dispatcher loads the PHP 8.2 signatures for image functions.
However this is incorrect for imagerotate(). In PHP <= 8.2, imagerotate() accepts 4 arguments, but in PHP >= 8.3 it accepts 3 arguments. Therefore, on a machine running PHP 8.3, Safe loads 8.2's old signatures and passes the function 4 arguments when it only accepts 3, causing breakage.
Consider the dispatcher for image functions:
safe/generated/image.php
Lines 9 to 11 in 6ea6a5b
If a machine is running PHP 8.3, the dispatcher loads the PHP 8.2 signatures for image functions.
However this is incorrect for
imagerotate(). In PHP <= 8.2,imagerotate()accepts 4 arguments, but in PHP >= 8.3 it accepts 3 arguments. Therefore, on a machine running PHP 8.3, Safe loads 8.2's old signatures and passes the function 4 arguments when it only accepts 3, causing breakage.