Page MenuHomePhabricator

WikiEditor edit sampling code triggers 'PHP Deprecated: Invalid characters passed for attempted conversion, these have been ignored' on PHP7.4+
Closed, ResolvedPublic

Description

Found when trying to enable PHP 7.4 as voting in Wikimedia production branches.

The inEventSample() code just blindly passes through the $sessionId input, but EventLogging expects this to be a hex string as it immediately uses it as such, and with PHP 7.4+ this is now enforced:

https://www.php.net/manual/en/migration74.deprecated.php#migration74.deprecated.core.invalid-base-characters

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
Resolved toan
ResolvedLucas_Werkmeister_WMDE
ResolvedJoe
ResolvedJdforrester-WMF
ResolvedLadsgroup
InvalidNone
ResolvedReedy
OpenNone
Resolvedtstarling
ResolvedJdforrester-WMF
ResolvedPRODUCTION ERRORLegoktm
Resolvedtstarling
ResolvedJoe
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF

Event Timeline

Change 821797 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiEditor@master] inEventSample: Avoid invalid character warning from sampling code, hash into hex

https://gerrit.wikimedia.org/r/821797

Change 821797 merged by jenkins-bot:

[mediawiki/extensions/WikiEditor@master] inEventSample: Avoid invalid character warning from sampling code, hash into hex

https://gerrit.wikimedia.org/r/821797

Change 821745 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiEditor@wmf/1.39.0-wmf.23] inEventSample: Avoid invalid character warning from sampling code, hash into hex

https://gerrit.wikimedia.org/r/821745

Change 821745 abandoned by Jforrester:

[mediawiki/extensions/WikiEditor@wmf/1.39.0-wmf.23] inEventSample: Avoid invalid character warning from sampling code, hash into hex

Reason:

Eh, let's just wait for the train.

https://gerrit.wikimedia.org/r/821745