r99889 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99888‎ | r99889 | r99890 >
Date:16:02, 15 October 2011
Author:krinkle
Status:resolved
Tags:
Comment:
[RL2] Commit live hack. Saving gadget on prototype/rl2_repo1 failed when trying to save through ApiEdit

---

Fatal error: Call to a member function getTimestamp() on a non-object in /srv/org/wikimedia/prototype/wikis/rl2/extensions/Gadgets/Gadgets.hooks.php on line

1 0.0005 166600 {main}( ) ../api.php:0
2 0.0671 12673328 ApiMain->execute( ) ../api.php:117
3 0.0671 12673472 ApiMain->executeActionWithErrorHandling( ) ../ApiMain.php:342
4 0.0671 12714488 ApiMain->executeAction( ) ../ApiMain.php:358
5 0.1034 17567056 ApiEditPage->execute( ) ../ApiMain.php:692
6 0.1333 22925072 EditPage->internalAttemptSave( ) ../ApiEditPage.php:273
7 0.1398 23698640 Article->doEdit( ) ../EditPage.php:1221
8 0.1398 23698640 Article->__call( ) ../Article.php:0
9 0.1398 23698640 call_user_func_array ( ) ../Article.php:1966
10 0.1398 23698640 WikiPage->doEdit( ) ../Article.php:0
11 0.1955 30665120 wfRunHooks( ) ../WikiPage.php:1279
12 0.1955 30665120 Hooks::run( ) ../GlobalFunctions.php:3659
13 0.1956 30669976 call_user_func_array ( ) ../Hooks.php:216
Modified paths:
  • /branches/RL2/extensions/Gadgets/Gadgets.hooks.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/Gadgets.hooks.php
@@ -90,7 +90,7 @@
9191 $repo = LocalGadgetRepo::singleton();
9292 // TODO: Timestamp in the constructor is ugly
9393 $gadget = new Gadget( $id, $repo, $text, $prevTs );
94 - $repo->modifyGadget( $gadget, $revision->getTimestamp() );
 94+ $repo->modifyGadget( $gadget, $revision ? $revision->getTimestamp() : $revision );
9595
9696 // modifyGadget() returns a Status object with an error if there was a conflict,
9797 // but we don't care. If a conflict occurred, that must be because a newer edit's

Follow-up revisions

RevisionCommit summaryAuthorDate
r102783[RL2] Properly fix the live hack from r99889catrope14:23, 11 November 2011

Status & tagging log