Page MenuHomePhabricator

PHP8 compatibility
Closed, ResolvedPublic


PageForms uses various deprecated PHP commands.
I am trying to fix them as I stumble upon them in my Github fork (sorry, it is like 70x easier to work there than on Gerrit). But I wouldn't know how to systematically address this.

Event Timeline

Thanks for putting these together. Are some/all of these real bugs, as in, you have seen a warning message from PHP 8 coming from these lines? Or did you simply look for instances where str_replace(), etc. were being called without a "null" check?

All of them come from actual warnings.

Change 947909 had a related patch set uploaded (by Yaron Koren; author: Yaron Koren):

[mediawiki/extensions/PageForms@master] Add null checks to prevent PHP 8 warnings

Change 947909 merged by jenkins-bot:

[mediawiki/extensions/PageForms@master] Add null checks to prevent PHP 8 warnings

Yaron_Koren claimed this task.

Thanks for these patches, then! I think I have fixed all six of these issues - in some cases with your exact change, in some cases with a null check. Anyway, I think it's resolved - but feel free to re-open if you still see any PHP 8 warnings.