laravel-aws-worker
laravel-aws-worker copied to clipboard
preg_match fails matching tries & timeouts
trafficstars
See https://github.com/dusterio/laravel-aws-worker/blob/aa8b6420769788a8bd4f03d844231ac4ede3a5a8/src/Controllers/WorkerController.php#L155
preg_match fails to match input body for tries & timeout. I have tested changing those 12 slashes into ~~2~~ 3 slashes only and conditions were not failing anymore.
// Try to extract listener class options from the serialized job body
if (preg_match('/tries\\\";i:(?<attempts>\d+);/', $input, $matches)) {
$parameters['maxTries'] = intval($matches['attempts']);
}
if (preg_match('/timeout\\\";i:(?<timeout>\d+);/', $input, $matches)) {
$parameters['timeout'] = intval($matches['timeout']);
}