plan2net / webp

Create a WebP copy for images (TYPO3 CMS)
GNU General Public License v3.0
60 stars 33 forks source link

Replace deprecated "GeneralUtility::shortMD5" function #60

Closed m41r closed 2 years ago

m41r commented 2 years ago

As of https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Deprecation-94684-GeneralUtilityShortMD5.html the Utility "GeneralUtility::shortMD5" has been deprecated and will be replaced with the native counterpart.

wazum commented 2 years ago

@m41r thanks for the hint, I'll take a look at it. As this is only valid for TYPO3 CMS 11, we possibly need a different solution here.

m41r commented 2 years ago

@wazum Well, the new code works independently of the Typo3 and PHP version...

wazum commented 2 years ago

@m41r no, it doesn't, as the checksum field in sys_file_processedfile is only 10 characters long in TYPO3 CMS < 11, that's not enough for a 32 character md5 string, you cut it, but that doesn't fix the original problem/intent of the change.

wazum commented 2 years ago

I'll add a condition and use the full md5 string for newer versions (or so).

m41r commented 2 years ago

@wazum yes, you're right - i thought just about the code, not the DB or the intent. My bad...

I'll add a condition and use the full md5 string for newer versions (or so).

That would be perfect. Thank you!

wazum commented 2 years ago

Code removed, as the repository always regenerates the hash anyway.