From: Stephane Bisson Date: Thu, 18 Jan 2018 20:09:59 +0000 (-0500) Subject: Log the reason why revision->getContent() returns null X-Git-Tag: 1.31.0-rc.0~449^2~1 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=8eb00f158422e5e2a9198f9d4318a1570b0f47af;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; } }