Last modified: 2014-05-11 12:21:14 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 T65291, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63291 - Fatal error: Call to a member function getOption() on a non-object in BetaFeaturesHooks.php on line 121
Fatal error: Call to a member function getOption() on a non-object in BetaFea...
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
BetaFeatures (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-31 03:51 UTC by Aude
Modified: 2014-05-11 12:21 UTC (History)
4 users (show)

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


Attachments

Description Aude 2014-03-31 03:51:19 UTC
this occurs when running phpunit tests, during UserTest::testEditCount().

Fatal error: Call to a member function getOption() on a non-object in /Library/WebServer/Documents/php-master/extensions/BetaFeatures/BetaFeaturesHooks.php on line 121

Call Stack:
    0.0004     672040   1. {main}() /Library/WebServer/Documents/php-master/tests/phpunit/phpunit.php:0
    0.0725   18073256   2. MediaWikiPHPUnitCommand::main() /Library/WebServer/Documents/php-master/tests/phpunit/phpunit.php:116
    0.0725   18085944   3. MediaWikiPHPUnitCommand->run() /Library/WebServer/Documents/php-master/tests/phpunit/MediaWikiPHPUnitCommand.php:64
    0.0725   18085992   4. PHPUnit_TextUI_Command->run() /Library/WebServer/Documents/php-master/tests/phpunit/MediaWikiPHPUnitCommand.php:80
    0.0947   21964992   5. PHPUnit_TextUI_TestRunner->doRun() /opt/local/lib/php/pear/PHPUnit/TextUI/Command.php:176
    0.0974   22466400   6. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php/pear/PHPUnit/TextUI/TestRunner.php:349
    0.8966   34379712   7. PHPUnit_Framework_TestSuite->runTest() /opt/local/lib/php/pear/PHPUnit/Framework/TestSuite.php:745
    0.8966   34379712   8. MediaWikiTestCase->run() /opt/local/lib/php/pear/PHPUnit/Framework/TestSuite.php:775
    0.8982   34379896   9. PHPUnit_Framework_TestCase->run() /Library/WebServer/Documents/php-master/tests/phpunit/MediaWikiTestCase.php:134
    0.8982   34379896  10. PHPUnit_Framework_TestResult->run() /opt/local/lib/php/pear/PHPUnit/Framework/TestCase.php:783
    0.8983   34380888  11. PHPUnit_Framework_TestCase->runBare() /opt/local/lib/php/pear/PHPUnit/Framework/TestResult.php:648
    0.8988   34433296  12. PHPUnit_Framework_TestCase->runTest() /opt/local/lib/php/pear/PHPUnit/Framework/TestCase.php:838
    0.8988   34434680  13. ReflectionMethod->invokeArgs() /opt/local/lib/php/pear/PHPUnit/Framework/TestCase.php:983
    0.8988   34434712  14. UserTest->testEditCount() /opt/local/lib/php/pear/PHPUnit/Framework/TestCase.php:983
    0.8991   34445632  15. User->addToDatabase() /Library/WebServer/Documents/php-master/tests/phpunit/includes/UserTest.php:190
    0.9010   34445472  16. User->saveOptions() /Library/WebServer/Documents/php-master/includes/User.php:3614
    0.9017   34466648  17. wfRunHooks() /Library/WebServer/Documents/php-master/includes/User.php:4759
    0.9017   34466696  18. Hooks::run() /Library/WebServer/Documents/php-master/includes/GlobalFunctions.php:4000
    0.9017   34467672  19. call_user_func_array:{/Library/WebServer/Documents/php-master/includes/Hooks.php:206}() /Library/WebServer/Documents/php-master/includes/Hooks.php:206
    0.9017   34468096  20. BetaFeaturesHooks::updateUserCounts() /Library/WebServer/Documents/php-master/includes/Hooks.php:206
Comment 1 Kunal Mehta (Legoktm) 2014-03-31 05:46:23 UTC
I can't reproduce this locally with master of core + BF.

In BF:

$oldUser = User::newFromName( $user->getName() );

Only reason this would return a non-object would be if the original username is not a valid one, however the unit test sets that to "UnitTestUser", which is obviously valid.
Comment 2 James Forrester 2014-05-11 12:21:14 UTC
Marking as WORKSFORME for now; can't reproduce either.

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


Navigation
Links