Steps to replicate the issue (include links if applicable):
Seems like installing excimer bugs PHP. No idea WHY and WHEN exactly happens (this error along with other weird errors (more complex) are reported by sentry), but uninstalling excimer seems to fix the issues.
What happens?:
Randomly following code
public function f() {
$first = 30;
$gap = 20;
$images = [];
$template = '...';
for ($i = 1 + $gap; $i <= $first * $gap; $i += $gap) {
$images[] = $this->amazonUrlBuilder->get($this->createFilesystemPathFor($template, $i));
}
}
private function createFilesystemPathFor(string $template, int $i): string
{
return $template . sprintf('%03d', $i) . '.jpg';
}breaks with following error:
Argument #2 ($i) must be of type int, null given
Which seems INSANE - I mean, how $i can be null in that case?
And some weird stuff that should never happen.
This is error reported by sentry, never experienced it while developing.
What should have happened instead?:
No not have this error.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
PHP 8.2.22 (cli) (built: Aug 1 2024 22:11:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.22, Copyright (c) Zend Technologies
with Zend OPcache v8.2.22, Copyright (c), by Zend Technologies
Other information (browser name/version, screenshots, etc.):
I suspect that could be due JIT enabled?
PHP is ran as cli script inside Alpine Linux (docker)
