We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I did not try your code, but looking at it helped me for my project (thanks). I am wondering if the hash function wouldnt make more sense to always return 10 digits. Sometimes it returns 9 or 11: https://github.com/aelvan/Stamp-Craft/blob/craft3/src/variables/StampVariable.php#L76
This is my current solution to this:
private function num_hash_file($filePath) { $crc = implode(unpack('C*', hash_file('crc32b', $filePath, true))); return substr(str_pad($crc, 10, '0', STR_PAD_LEFT), 0, 10); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I did not try your code, but looking at it helped me for my project (thanks). I am wondering if the hash function wouldnt make more sense to always return 10 digits. Sometimes it returns 9 or 11:
https://github.com/aelvan/Stamp-Craft/blob/craft3/src/variables/StampVariable.php#L76
This is my current solution to this:
The text was updated successfully, but these errors were encountered: