Last modified: 2014-01-21 20:54:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62203, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60203 - Warning: strpos(): Empty delimiter in /.../AbuseFilter.parser.php on line 1912
Warning: strpos(): Empty delimiter in /.../AbuseFilter.parser.php on line 1912
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
AbuseFilter (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Jackmcbarn
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-18 13:26 UTC by Owltom
Modified: 2014-01-21 20:54 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Owltom 2014-01-18 13:26:59 UTC
Warning triggered in our wiki when uploading, moving, deleting a file or deleting a page ...

In this cases, the var $needle isn't defined (I don't know why), so strpos fails.

I manually fixed this warning in our wiki by adding

if (isset($needle)) { 
...
}

around the foreach-part in at line 1912

https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FAbuseFilter/9c1d878b76ff9e2f65fda6556b1fec0b67e1bb1f/AbuseFilter.parser.php#L1912
Comment 1 Jackmcbarn 2014-01-18 16:09:20 UTC
This looks like it's related to one of your specific filters. What filters are you using?
Comment 2 Owltom 2014-01-18 16:37:08 UTC
Ohh, I'm such an idiot ... I didn't think of our filters ... ;)

this filter was causing it:

contains_any( lcase ( rmwhitespace (added_lines) ),
"{{trash}}",
"{{dorftrottel}}",
"{{schmiede}}",
) &
article_namespace != 10
Comment 3 Gerrit Notification Bot 2014-01-18 17:08:47 UTC
Change 108220 had a related patch set uploaded by Jackmcbarn:
Don't pass empty strings to strpos

https://gerrit.wikimedia.org/r/108220
Comment 4 Jackmcbarn 2014-01-18 17:12:41 UTC
By the way, the problem happened to you because of the extra comma after the last parameter to contains_any.
Comment 5 Owltom 2014-01-18 17:40:21 UTC
thank you :)
Comment 6 Gerrit Notification Bot 2014-01-21 20:52:44 UTC
Change 108220 merged by jenkins-bot:
Don't pass empty strings to strpos

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links