- Issue created by @ptmkenny
- Merge request !7Issue #3337418: PHP 8.2 and PHP 9: utf8_encode + utf8_decode are deprecated → (Merged) created by ptmkenny
- Status changed to Needs work
almost 2 years ago 1:51am 30 January 2023 - 🇯🇵Japan ptmkenny
This MR experimentally removes the functions for testing purposes.
- Status changed to RTBC
10 months ago 4:20pm 20 January 2024 - 🇦🇺Australia elc
I've done some experimenting and this patch can be applied without hesitation. This change is required when using PHP 8.2. The deprecation notices slow a site down significantly.
The use of utf8_encode and utf8_decode is done on the resulting encrypted string. It is thus entirely superfluous to the function of the encryption, storage of the encrypted string, or retrieval and decryption.
There is an extra utf8_encode called on the decrypted email address but this an additional encode on a string that was previously perfectly fine inside Drupal. It should be considered a bug that this is being done - thankfully this deprecation has turned it up.
eg. the string it's working on
def50200a15257aa6ab390cae057c1228ba55db4c3129ccea7976554e9954147d3749f788ac1e6bc732738ae1fe3e42622d3d7f764ba0e582a6970684ad54beabae22b465411cacb23c12d49af58c5556d8eccb6ca380fcf83cc70f9ae59fdbb6c5ce126
The use of utf8_encode or utf8_decode is just being used on a hexadecimal string. Quite useless, and will never change the result.
- 🇵🇹Portugal jcnventura
Agree fully with #4, according to https://git.drupalcode.org/project/encryption/-/blob/3.0.x/src/Encryptio..., the output of the encryption service is already base64 encoded, and doesn't need the utf8_encode (and the missing decode step that is indeed buggy as it re-encodes the value..)..
- last update
10 months ago 11 pass -
jcnventura →
committed 764a5eed on 3.x authored by
ptmkenny →
Issue #3337418 by ptmkenny, ELC, jcnventura: PHP 8.2 and PHP 9:...
-
jcnventura →
committed 764a5eed on 3.x authored by
ptmkenny →
- Status changed to Fixed
10 months ago 6:36pm 21 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.