Page MenuHomePhabricator

Exception after call_user_func causes error (PHP Notice: Undefined index: file, PHP Notice: Undefined index: line)
Closed, ResolvedPublic

Description

Cause an exception from something with call_user_func in its stack.

For example, if you use wfUseMW( '2000.0' ); inside VisualEditor::onSetup (wgExtensionFunctions), you get:

Notice: Undefined index: file in /includes/Exception.php on line 725
Notice: Undefined index: line in /includes/Exception.php on line 725
Notice: Undefined index: file in /includes/Exception.php on line 725
Notice: Undefined index: line in /includes/Exception.php on line 725

MediaWiki 2000.0 required--this is only 1.22alpha

Backtrace:

#0 /extensions/VisualEditor/VisualEditor.hooks.php(23): wfUseMW('1.229wmf11')
#1 (): VisualEditorHooks::onSetup()
#2 /includes/Setup.php(592): call_user_func('VisualEditorHooks::onSetup')
#3 /includes/WebStart.php(153): require_once('/includes/Setup.php')
#4 /index.php(46): require('/includes/WebStart.php')
#5 {main}


Version: 1.22.0
Severity: normal

Details

Reference
bz55634

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:29 AM
bzimport added a project: MediaWiki-General.
bzimport set Reference to bz55634.
bzimport added a subscriber: Unknown Object (MLST).
Krinkle created this task.Oct 11 2013, 6:13 PM

Change 89243 had a related patch set uploaded by Krinkle:
exception: Account for $call['file'] and $call['line'] being unset

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

(In reply to comment #0)

Notice: Undefined index: file in /includes/Exception.php on line 725
Notice: Undefined index: line in /includes/Exception.php on line 725
Notice: Undefined index: file in /includes/Exception.php on line 725
Notice: Undefined index: line in /includes/Exception.php on line 725
MediaWiki 2000.0 required--this is only 1.22alpha
Backtrace:
#0 /extensions/VisualEditor/VisualEditor.hooks.php(23): wfUseMW('1.229wmf11')
#1 (): VisualEditorHooks::onSetup()
#2 /includes/Setup.php(592): call_user_func('VisualEditorHooks::onSetup')
#3 /includes/WebStart.php(153): require_once('/includes/Setup.php')
#4 /index.php(46): require('/includes/WebStart.php')
#5 {main}

New output after the patch:

#0 /extensions/VisualEditor/VisualEditor.hooks.php(23): wfUseMW('1.229wmf11')
#1 {internal}: VisualEditorHooks::onSetup()
#2 /includes/Setup.php(592): call_user_func('VisualEditorHooks::onSetup')
#3 /includes/WebStart.php(153): require_once('/includes/Setup.php')
#4 /index.php(46): require('/includes/WebStart.php')
#5 {main}

Change 89243 merged by jenkins-bot:
exception: Account for $call['file'] and $call['line'] being unset

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

  • Bug 55479 has been marked as a duplicate of this bug. ***

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

  • Bug 55479 has been marked as a duplicate of this bug. ***

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