Last modified: 2012-08-29 19:17:58 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 T41085, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39085 - Echo Call to a member function getText() on a non-object
Echo Call to a member function getText() on a non-object
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Echo (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-06 20:52 UTC by Sam Reed (reedy)
Modified: 2012-08-29 19:17 UTC (History)
3 users (show)

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


Attachments

Description Sam Reed (reedy) 2012-08-06 20:52:08 UTC
PHP Fatal error:  Call to a member function getText() on a non-object in /usr/local/apache/common-local/php-1.20wmf9/extensions/Echo/includes/DiscussionParser.php on line 127



I thought this had been fixed already (?).. I seem to recall a discussion about it, and possibly a commit. But maybe not?
Comment 1 Sam Reed (reedy) 2012-08-06 20:55:15 UTC
(In reply to comment #0)
> I thought this had been fixed already (?).. I seem to recall a discussion about
> it, and possibly a commit. But maybe not?


Now I remember it was a replag related issue we did discuss, but couldn't fix.. i think
Comment 2 Sam Reed (reedy) 2012-08-07 18:56:54 UTC
Broken in UnitTests..

PHP Fatal error:  Call to a member function getText() on a non-object in /var/www/wiki/mediawiki/extensions/Echo/includes/DiscussionParser.php on line 127
PHP Stack trace:
PHP   1. {main}() /var/www/wiki/mediawiki/core/tests/phpunit/phpunit.php:0
PHP   2. MediaWikiPHPUnitCommand::main() /var/www/wiki/mediawiki/core/tests/phpunit/phpunit.php:103
PHP   3. PHPUnit_TextUI_Command->run() /var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiPHPUnitCommand.php:45
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
PHP   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
PHP   6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   7. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   8. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   9. PHPUnit_Framework_TestSuite->runTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:745
PHP  10. MediaWikiTestCase->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:772
PHP  11. PHPUnit_Framework_TestCase->run() /var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:75
PHP  12. PHPUnit_Framework_TestResult->run() /usr/share/php/PHPUnit/Framework/TestCase.php:751
PHP  13. PHPUnit_Framework_TestCase->runBare() /usr/share/php/PHPUnit/Framework/TestResult.php:649
PHP  14. PHPUnit_Framework_TestCase->runTest() /usr/share/php/PHPUnit/Framework/TestCase.php:804
PHP  15. ReflectionMethod->invokeArgs() /usr/share/php/PHPUnit/Framework/TestCase.php:942
PHP  16. WikiPageTest->testIsCountable() /var/www/wiki/mediawiki/core/tests/phpunit/includes/WikiPageTest.php:0
PHP  17. WikiPageTest->createPage() /var/www/wiki/mediawiki/core/tests/phpunit/includes/WikiPageTest.php:377
PHP  18. WikiPage->doEdit() /var/www/wiki/mediawiki/core/tests/phpunit/includes/WikiPageTest.php:66
PHP  19. wfRunHooks() /var/www/wiki/mediawiki/core/includes/WikiPage.php:1649
PHP  20. Hooks::run() /var/www/wiki/mediawiki/core/includes/GlobalFunctions.php:3907
PHP  21. call_user_func_array() /var/www/wiki/mediawiki/core/includes/Hooks.php:216
PHP  22. EchoHooks::onArticleSaved() /var/www/wiki/mediawiki/core/includes/Hooks.php:0
PHP  23. EchoDiscussionParser::generateEventsForRevision() /var/www/wiki/mediawiki/extensions/Echo/Hooks.php:187
PHP  24. EchoDiscussionParser::getChangeInterpretationForRevision() /var/www/wiki/mediawiki/extensions/Echo/includes/DiscussionParser.php:16

Fatal error: Call to a member function getText() on a non-object in /var/www/wiki/mediawiki/extensions/Echo/includes/DiscussionParser.php on line 127

Call Stack:
    0.0007     669480   1. {main}() /var/www/wiki/mediawiki/core/tests/phpunit/phpunit.php:0
    1.5627   22451344   2. MediaWikiPHPUnitCommand::main() /var/www/wiki/mediawiki/core/tests/phpunit/phpunit.php:103
    1.5628   22467104   3. PHPUnit_TextUI_Command->run() /var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiPHPUnitCommand.php:45
    5.4282  134693136   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
    5.4522  135245680   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
    5.4524  135247296   6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
   46.0815  206164768   7. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
   54.1869  206979320   8. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
   59.1305  207254032   9. PHPUnit_Framework_TestSuite->runTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:745
   59.1305  207254032  10. MediaWikiTestCase->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:772
   59.1346  207254288  11. PHPUnit_Framework_TestCase->run() /var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:75
   59.1348  207254288  12. PHPUnit_Framework_TestResult->run() /usr/share/php/PHPUnit/Framework/TestCase.php:751
   59.1393  207255872  13. PHPUnit_Framework_TestCase->runBare() /usr/share/php/PHPUnit/Framework/TestResult.php:649
   59.1395  207297384  14. PHPUnit_Framework_TestCase->runTest() /usr/share/php/PHPUnit/Framework/TestCase.php:804
   59.1396  207299992  15. ReflectionMethod->invokeArgs() /usr/share/php/PHPUnit/Framework/TestCase.php:942
   59.1396  207300080  16. WikiPageTest->testIsCountable() /var/www/wiki/mediawiki/core/tests/phpunit/includes/WikiPageTest.php:0
   59.1396  207300224  17. WikiPageTest->createPage() /var/www/wiki/mediawiki/core/tests/phpunit/includes/WikiPageTest.php:377
   59.1401  207308360  18. WikiPage->doEdit() /var/www/wiki/mediawiki/core/tests/phpunit/includes/WikiPageTest.php:66
   59.2938  207344808  19. wfRunHooks() /var/www/wiki/mediawiki/core/includes/WikiPage.php:1649
   59.2938  207344808  20. Hooks::run() /var/www/wiki/mediawiki/core/includes/GlobalFunctions.php:3907
   59.2950  207390664  21. call_user_func_array() /var/www/wiki/mediawiki/core/includes/Hooks.php:216
   59.2950  207392560  22. EchoHooks::onArticleSaved() /var/www/wiki/mediawiki/core/includes/Hooks.php:0
   59.3034  207676736  23. EchoDiscussionParser::generateEventsForRevision() /var/www/wiki/mediawiki/extensions/Echo/Hooks.php:187
   59.3034  207676736  24. EchoDiscussionParser::getChangeInterpretationForRevision() /var/www/wiki/mediawiki/extensions/Echo/includes/DiscussionParser.php:16
Comment 3 Andrew Garrett 2012-08-08 16:34:45 UTC
		$prevRevision = Revision::newFromId( $revision->getParentId() );

		$changes = self::getMachineReadableDiff( $prevRevision->getText(), $revision->getText() );

I bet that happens when creating a new page…
Comment 4 Alex Monk 2012-08-08 16:35:46 UTC
That's when it's been happening to me, so yes.
Comment 5 Andrew Garrett 2012-08-13 15:17:20 UTC
I have a fix: https://gerrit.wikimedia.org/r/19223
Comment 6 Alex Monk 2012-08-29 19:17:58 UTC
Merged by Tychay.

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


Navigation
Links