Lucas_Werkmeister_WMDE added a comment.
> I’m pretty sure this use of the functions is pointless (though “correct” in that the methods perform their inverse operations). MediaWiki sets `mb_internal_encoding( 'UTF-8' );` early in `Setup.php` (since T137509 <https://phabricator.wikimedia.org/T137509>), so there is no reason to assume that PHP `serialize()` returns Latin 1 that needs to be UTF-8 encoded before being passed into `json_encode()` – we’re just putting JSONified mojibake in the inner cache. It turns out that the class has a test (`SimpleCacheTestCase::testBinaryData()`, inherited from an upstream library) that asserts that binary data can be stored in the cache and retrieved correctly; this breaks if the `utf8_encode()` is removed. However, I see no reason for us to support this (we only put text into the cache, not binary data), so I think we should just skip the test. TASK DETAIL https://phabricator.wikimedia.org/T324202 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Jdforrester-WMF, WMDE-leszek, thiemowmde, Paladox, Michael, ItamarWMDE, Aklapper, Lucas_Werkmeister_WMDE, Danny_Benjafield_WMDE, Isabelladantes1983, Themindcoder, Adamm71, S8321414, Jersione, Hellket777, LisafBia6531, Astuthiodit_1, malberts, 786, Biggs657, karapayneWMDE, Invadibot, maantietaja, Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, darthmon_wmde, Kent7301, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, TK-999, QZanden, KimKelting, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Neuronton, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org