Some functions deprecated in PHP 8.4 (uniqid, md5_hash and more)

Xon

Well-known member
Affected version
2.3.7
uniqid/sha1/md5/md5_file/sha1_file functions are being deprecated in php 8.4


sha1/md5 can be fixed by just converting to using hash('md5', ...) (or hash('sha1', ...)), while md5_file/sha1_file use hash_file instead.

Most uses of uniqid() probably should be replaced with something more reliablely unique. It looks like a few XF uses are around temp files which isn't ideal as triggering accidental collisions is doable
 
Last edited:
I miss-read the rfc for the deprecations. They are doing item based voting but that wasn't reflected in the summary :(

The changes for uniqid() probably should be done anyway to avoid easy collisions
 
Back
Top Bottom