simetrical(a)svn.wikimedia.org schreef:
Revision: 41085
Author: simetrical
Date: 2008-09-21 02:53:24 +0000 (Sun, 21 Sep 2008)
Log Message:
-----------
Prohibit empty page titles at a low level
This adds a sanity check to EditPage::doEdit() that throws an exception if the
Title's name (sans namespace) is empty. Apparently the API edit module doesn't
handle this error correctly at a high level, as evidenced by page 19405691 on enwiki. I
didn't try to test whether this extra check stops the particular error, but it
doesn't hurt in any case.
<snip>
+ if( $this->mTitle->getText() == '' ) {
This makes me wonder: I thought the Title constructor returned null when
asked to create such titles? Has this behavior changed? If not, I'm very
curious how on earth an invalid Title object manages to 1) exist and 2)
find its way into EditPage::doEdit().
Roan Kattouw (Catrope)