When running PHP 8.0.0 there is an issue with the sprintf function in MailTrackerController.php
Steps to reproduce
Have Laravel running with PHP 8.0.0
Install mail-tracker, migrate, and send an email
Open the email, should load image and update database (which it does not)
When manually loading the tracking gif in a browser the issue becomes visible
How to fix
That is actually quite simple. I've dig deeper and found that the last byte (59) isn't even in the returned response. Probably only a c missing after the %, so:
When running PHP 8.0.0 there is an issue with the
sprintf
function inMailTrackerController.php
Steps to reproduce
How to fix
That is actually quite simple. I've dig deeper and found that the last byte (
59
) isn't even in the returned response. Probably only ac
missing after the%
, so:Before
$pixel = sprintf('%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%', 71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 255, 0, 192, 192, 192, 0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0, 59);
After
$pixel = sprintf('%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c', 71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 255, 0, 192, 192, 192, 0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0, 59);
Comparing the response in a hex editor (
curl http://localhost/email/t/hash | hexdump
) now shows the last byte (59
).