Page MenuHomePhabricator

AbuseFilter: PHP Notice comes up in error log
Closed, ResolvedPublicBUG REPORT

Description

When using AbuseFilter on MediaWiki 1.35 on PHP 7.4 I get the below error. I’m using AbuseFilter on REL1_35


Steps to Reproduce:
Install AbuseFilter on MediaWiki 1.35 with PHP7.4


Actual Results:
PHP Notice: Trying to access array offset on value of type null in /var/www/html/extensions/AbuseFilter/includes/Views/AbuseFilterViewDiff.php on line 212


Expected Results:
No PHP Warning

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Install AbuseFilter on MediaWiki 1.35 with PHP7.4

This isn't a replication criteria. I doubt just installing it results in an error in AbuseFilterViewDiff.

What do you mean by "using AbuseFilter"? Visiting Special:AbuseFilter? Triggering a filter? Somthing else?

The error looks like it’s from viewing diffs within AbuseFilter

Actually, looking at my access logs, I can see that at the times that the error comes up somebody tried to access invalid diffs.

Daimona added a subscriber: Daimona.

Actually, looking at my access logs, I can see that at the times that the error comes up somebody tried to access invalid diffs.

Yeah, I think this is possible. The code doesn't check for null. The notice should be avoided nonetheless.

Change 654225 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Check for non-existing version in ViewDiff

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

Change 654225 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Check for non-existing version in ViewDiff

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