`Parser::getTitle` may return `null`, even though it is not allowed to

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

`Parser::getTitle` may return `null`, even though it is not allowed to

Robert Vogel

In version 1.34 creating a `Parser` object without explicitly setting the `mTitle` value was
deprecated. But as it is just a deprecation yet, there are still cases where `mTitle` can be `null`
(it seems like this is even the case when calling the proper service with

Unfortunately the `Parser::getTitle` method got changed, in a way that it _must_ return an instance
of `Title`. No `null` allowed. This leads to a `TypeError`.

I have found two Phabricator tasks, each with a proper patch for this:

- https://phabricator.wikimedia.org/T228881 /
- https://phabricator.wikimedia.org/T245129 /

It looks like a very small change. I'd very much appreciate if somebody could review and merge one
of these.

Robert Vogel
Wikitech-l mailing list
[hidden email]