Last modified: 2013-10-28 08:15:09 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 T57479, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55479 - Undefined indexes in MWExceptionHandler::formatRedactedTrace
Undefined indexes in MWExceptionHandler::formatRedactedTrace
Status: RESOLVED DUPLICATE of bug 55634
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.22.0
All All
: High minor (vote)
: ---
Assigned To: Dereckson
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-08 19:11 UTC by Dereckson
Modified: 2013-10-28 08:15 UTC (History)
0 users

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


Attachments

Description Dereckson 2013-10-08 19:11:03 UTC
Notice: Undefined index: file in /var/wwwroot/dereckson.be/mediawiki/includes/Exception.php on line 740

In an exception stacktrace, I get the following value without file/line value:

Array
(
    [function] => doEditContent
    [class] => WikiPage
    [type] => ->
    [args] => Array
        (
            [0] => WikitextContent Object
                (
                    [model_id:protected] => wikitext
                    [mText] => Lorem ipsum dolor
                )

            [1] => 
            [2] => 98
            [3] => 
            [4] => 
            [5] => text/x-wiki
        )

)

This generates a notice as the following debug code always expect these:
File: includes/Exception.php
Method: formatRedactedTrace
Code (around line 740): $finalExceptionText .= "#{$i} {$call['file']}({$call['line']}): ";

To reproduce this bug:
1. $wgHooks['PageContentSaveComplete'][] = 'ANonExistentFunction';
2. edit a page and save it
Comment 1 Dereckson 2013-10-08 19:12:58 UTC
For reference, the full stracktrace is:
#0 /var/wwwroot/dereckson.be/mediawiki/includes/GlobalFunctions.php(3934): Hooks::run('PageContentSaveComplete', Array)
#1 /var/wwwroot/dereckson.be/mediawiki/includes/WikiPage.php(1932): wfRunHooks('PageContentSaveComplete', Array)
#2 (): WikiPage->doEditContent(Object(WikitextContent), '', 98, false, NULL, 'text/x-wiki')
#3 /var/wwwroot/dereckson.be/mediawiki/includes/Article.php(2028): call_user_func_array(Array, Array)
#4 /var/wwwroot/dereckson.be/mediawiki/includes/EditPage.php(1755): Article->__call('doEditContent', Array)
#5 /var/wwwroot/dereckson.be/mediawiki/includes/EditPage.php(1755): Article->doEditContent(Object(WikitextContent), '', 98, false, NULL, 'text/x-wiki')
#6 /var/wwwroot/dereckson.be/mediawiki/includes/EditPage.php(1214): EditPage->internalAttemptSave(Array, false)
#7 /var/wwwroot/dereckson.be/mediawiki/includes/EditPage.php(416): EditPage->attemptSave()
#8 /var/wwwroot/dereckson.be/mediawiki/includes/actions/EditAction.php(50): EditPage->edit()
#9 /var/wwwroot/dereckson.be/mediawiki/includes/actions/EditAction.php(76): EditAction->show()
#10 /var/wwwroot/dereckson.be/mediawiki/includes/Wiki.php(448): SubmitAction->show()
#11 /var/wwwroot/dereckson.be/mediawiki/includes/Wiki.php(312): MediaWiki->performAction(Object(Article), Object(Title))
#12 /var/wwwroot/dereckson.be/mediawiki/includes/Wiki.php(600): MediaWiki->performRequest()
#13 /var/wwwroot/dereckson.be/mediawiki/includes/Wiki.php(467): MediaWiki->main()
#14 /var/wwwroot/dereckson.be/mediawiki/index.php(49): MediaWiki->run()
#15 {main}

The no file/line call is the one after a call_user_func_array.
Comment 2 Gerrit Notification Bot 2013-10-08 20:31:39 UTC
Change 88628 had a related patch set uploaded by Dereckson:
Fixes stacktrace output when no file context is available.

https://gerrit.wikimedia.org/r/88628
Comment 3 Gerrit Notification Bot 2013-10-15 23:41:36 UTC
Change 88628 abandoned by Dereckson:
Fixes stacktrace output when no file context is available.

Reason:
Meanwhile fixed by I1173216cade73216848816f6bb51e54096abdfde after a report in bug 55634.

#2 [internal function]: WikiPage->doEditContent(Object(WikitextContent), '', 98, false, NULL, 'text/x-wiki')

https://gerrit.wikimedia.org/r/88628
Comment 4 Dereckson 2013-10-15 23:42:15 UTC

*** This bug has been marked as a duplicate of bug 55634 ***
Comment 5 Gerrit Notification Bot 2013-10-15 23:59:32 UTC
Change 90067 had a related patch set uploaded by Dereckson:
Fixes stacktrace output when an internal function is called.

https://gerrit.wikimedia.org/r/90067
Comment 6 Dereckson 2013-10-16 00:03:51 UTC
One bug is enough to track this.

*** This bug has been marked as a duplicate of bug 55634 ***
Comment 7 Gerrit Notification Bot 2013-10-28 08:15:09 UTC
Change 90067 abandoned by Dereckson:
Fixes stacktrace output when an internal function is called.

Reason:
As the information isn't pertinent to the exception position.

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

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


Navigation
Links