From 8eb00f158422e5e2a9198f9d4318a1570b0f47af Mon Sep 17 00:00:00 2001 From: Stephane Bisson Date: Thu, 18 Jan 2018 15:09:59 -0500 Subject: [PATCH] Log the reason why revision->getContent() returns null In the context of WikiPage->doEditUpdates(), when $revision->getContent() returns null, $this->prepareContentForEdit() fails because it expects something that implements 'Content' as its first argument but null is given. This problem happens during Flow beta feature opt-out. I hope this logging is not too spammy and helps shed light on the Flow problem. Bug: T184670 Change-Id: If06b8fda3657cae2eb23821f35e5b87919ceb615 --- includes/Revision.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/Revision.php b/includes/Revision.php index 510c1ee231..ffcb8b49b6 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -890,6 +890,11 @@ class Revision implements IDBAccessObject { return $this->mRecord->getContent( 'main', $audience, $user ); } catch ( RevisionAccessException $e ) { + wfDebugLog( + 'T184670', + __METHOD__ . ": Cannot get content: " . $e->getMessage() . + "\n" . $e->getTraceAsString() + ); return null; } } -- 2.20.1