From e3a7bfda34ff76d4fd1b4af9564ebbc5ea77b0f7 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 3 Dec 2018 23:46:09 -0800 Subject: [PATCH] mediawiki fedmsg-emit: fix error on creating page (#7415) This function is set up as a mediawiki hook. It expects to be passed 12 args. It turns out that mediawiki 1.29.3 - the version we're running - has two codepaths that call the hook: one passes it all 12 args, one only passes it 11, missing out the final arg (undidRevId). @puiterwijk tried to fix this in d85f8c2, but it seems he misread and set a default value for the 11th arg rather than the 12th, so it didn't actually fix the problem. Moving the default value to the 12th arg should fix the problem for good. Signed-off-by: Adam Williamson --- roles/mediawiki/files/fedmsg-emit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mediawiki/files/fedmsg-emit.php b/roles/mediawiki/files/fedmsg-emit.php index 846d28e8aa..cda0b0e83f 100644 --- a/roles/mediawiki/files/fedmsg-emit.php +++ b/roles/mediawiki/files/fedmsg-emit.php @@ -205,8 +205,8 @@ function article_save( &$flags, $revision, &$status, - $baseRevId=0, - $undidRevId + $baseRevId, + $undidRevId=0 ) { # If for some reason or another we can't create our socket, then bail.