Html: Fix "substr(): Passing null to parameter #1 ($string) of type string is deprecated"
Bug: T388944 Change-Id: Iaba9973aa774f0bac9cf56efc76bc249d4f578ee (cherry picked from commit e3dd105b209597ccff5eb8a39e79bdc75c1a9b8a)
This commit is contained in:
parent
fe57b122b5
commit
e3403e20e2
1 changed files with 1 additions and 1 deletions
|
|
@ -847,7 +847,7 @@ class Html {
|
|||
public static function textarea( $name, $value = '', array $attribs = [] ) {
|
||||
$attribs['name'] = $name;
|
||||
|
||||
if ( substr( $value, 0, 1 ) == "\n" ) {
|
||||
if ( substr( $value ?? '', 0, 1 ) == "\n" ) {
|
||||
// Workaround for T14130: browsers eat the initial newline
|
||||
// assuming that it's just for show, but they do keep the later
|
||||
// newlines, which we may want to preserve during editing.
|
||||
|
|
|
|||
Loading…
Reference in a new issue