Reedy has uploaded a new change for review.

Change subject: Beware that getContent() may return null
......................................................................

Beware that getContent() may return null

Before the introduction of the content handler, missing content was
signified by getText() returning null instead of a string. null will
work much like an empty string in most contexts, so in many places,
it was not checked explcitely whether the conent was null.

Now, when getContent() returns null, this often caused a fatal error,
because the code would access whatever getContent() returned as an object,
without checking whether it was null (because no such check was performed
previously, when the content was represented as a string).

This check introduces explicite checks for getContent() returning null
in the most essential core classes.

Change-Id: I551a90b0b67b8edc7570ca5d252ecc1de903f097
---
M includes/Article.php
M includes/Revision.php
M includes/Title.php
M includes/WikiPage.php
M includes/diff/DifferenceEngine.php
M includes/job/jobs/DoubleRedirectJob.php
M includes/job/jobs/RefreshLinksJob.php
M includes/parser/Parser.php
M includes/resourceloader/ResourceLoaderWikiModule.php
M includes/search/SearchEngine.php
10 files changed, 64 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/32714/1
--
To view, visit https://gerrit.wikimedia.org/r/32714
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I551a90b0b67b8edc7570ca5d252ecc1de903f097
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf3
Gerrit-Owner: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to