HTMLTitleTextField, HTMLUserTextField: Check for `null` before using the value
authorPrateek Saxena <prtksxna@gmail.com>
Tue, 17 Jul 2018 04:54:03 +0000 (10:24 +0530)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 17 Jul 2018 22:42:52 +0000 (00:42 +0200)
commit500f7a5bad20004fcf8a87d46428d0a20d9cd97b
treeadc9f6909e478a34f2b22314c3504dee28ca138b
parentdf6491f78bb62a7c8da01c67ae518572cafe4c5b
HTMLTitleTextField, HTMLUserTextField: Check for `null` before using the value

Otherwise HTMLTitleTextField sends null to Title::newFromTextThrow(),
which causes an exception when trying to look it up in a cache.

Similar issue is present in HTMLUserTextField, although that one
hasn't caused problems in practice yet.

Follows-up on I93ad51ffe7bee597d2d127f4c5d6b2929ffc8f7e and
I0de4194a37b6ef260d35feb1e6730985775d5351.

Bug: T199763
Change-Id: I29ecd94cdf9e3064e6e9e7f4e65a50f267b5282d
includes/htmlform/fields/HTMLTitleTextField.php
includes/htmlform/fields/HTMLUserTextField.php