Last modified: 2012-02-21 19:11:41 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 T33728, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31728 - Warning: class_exists() expects parameter 1 to be string, array given in includes/logging/LogFormatter.php on line 39
Warning: class_exists() expects parameter 1 to be string, array given in incl...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Recent changes (Other open bugs)
1.20.x
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-15 14:54 UTC by Helder
Modified: 2012-02-21 19:11 UTC (History)
4 users (show)

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


Attachments

Description Helder 2011-10-15 14:54:45 UTC
I'm using trunk version of MediaWiki and installed [[mw:Extension:AbuseFilter]]. After creating my first filter, if I go to [[Special:RecentChanges]] I get
----
Warning: class_exists() expects parameter 1 to be string, array given in /var/www/mw/includes/logging/LogFormatter.php on line 39 
----

in the top of the page. If I go to my filter and do some random edit to it and go back to Special:RecentChanges I get the previous message two times. If I edit my filter over and over again, the number of warnings will keep increasing.

If I go to /var/www/mw/includes/logging/LogFormatter.php and add the code
  if( is_array( $handler ) ) { wfDebugDieBacktrace(); }
just before the line 39, I get:
----
Backtrace:
#0 /var/www/mw/includes/logging/LogFormatter.php(38): wfDebugDieBacktrace()
#1 /var/www/mw/includes/logging/LogFormatter.php(54): LogFormatter::newFromEntry(Object(RCDatabaseLogEntry))
#2 /var/www/mw/includes/ChangesList.php(365): LogFormatter::newFromRow(Array)
#3 /var/www/mw/includes/ChangesList.php(557): ChangesList->insertLogEntry(Object(RecentChange))
#4 /var/www/mw/includes/specials/SpecialRecentchanges.php(516): OldChangesList->recentChangesLine(Object(RecentChange), false, 2)
#5 /var/www/mw/includes/specials/SpecialRecentchanges.php(168): SpecialRecentChanges->webOutput(Object(ResultWrapper), Object(FormOptions))
#6 /var/www/mw/includes/SpecialPageFactory.php(465): SpecialRecentChanges->execute(NULL)
#7 /var/www/mw/includes/Wiki.php(225): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#8 /var/www/mw/includes/Wiki.php(623): MediaWiki->performRequest()
#9 /var/www/mw/includes/Wiki.php(532): MediaWiki->main()
#10 /var/www/mw/index.php(58): MediaWiki->run()
#11 {main}
----
Comment 1 Helder 2011-10-15 15:04:10 UTC
Adding Default CC of AbuseFilter extension, since the warning goes away if I remove the extension from my LocalSettings.php.
Comment 2 Krinkle 2011-10-15 15:28:58 UTC
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/logging/LogFormatter.php?revision=98738&view=markup#l39
> $handler = $wgLogActionsHandlers[ .. ]';
> class_exists( $handler )

It comes from wgLogActionsHandlers


http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/AbuseFilter/AbuseFilter.php?revision=98495&view=markup#l96

> $wgLogActionsHandlers['abusefilter/modify'] = array( 'AbuseFilter', 'modifyActionText' );
Comment 3 Aaron Schulz 2012-02-21 19:11:41 UTC
Should be fixed by r100396/r100447.

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


Navigation
Links