Page MenuHomePhabricator

E_WARNING in ArticleFeedbackv5.activity.php on line 305
Closed, ResolvedPublic


Warning: Invalid argument supplied for foreach() in ../extensions/ArticleFeedbackv5/ArticleFeedbackv5.activity.php on line 305

Said foreach loop, which starts on L285, uses $wgArticleFeedbackv5Permissions, which is correctly declared as a global in the function...but that variable appears to be empty (as in literally empty, not even an empty array), which is probably causing this E_WARNING. (There is also a related JS global, which is set in ArticleFeedbackv5.hooks.php.)

Looking at the configuration the WMF used for AFTv5, I'm guessing we need to use $wgArticleFeedbackv5DefaultPermissions (defined in ArticleFeedbackv5Hooks::registerExtension(), which is registered as the callback in extension.json) instead of $wgArticleFeedbackv5Permissions in this file as well as the two other files (maintenance/purgeCache.php and tests/ArticleFeedbackv5ModelTest.php) which reference this global?

cc'ing @Legoktm for input

Event Timeline

ashley created this task.Jun 21 2017, 1:31 PM

Change 495823 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/ArticleFeedbackv5@master] Bring back $wgArticleFeedbackv5Permissions

Change 495823 merged by jenkins-bot:
[mediawiki/extensions/ArticleFeedbackv5@master] Bring back $wgArticleFeedbackv5Permissions

ashley closed this task as Resolved.Mar 12 2019, 2:38 PM
ashley claimed this task.
ashley removed a project: Patch-For-Review.