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