From e3dd105b209597ccff5eb8a39e79bdc75c1a9b8a Mon Sep 17 00:00:00 2001 From: Paladox Date: Mon, 17 Mar 2025 13:40:57 +0000 Subject: Html: Fix "substr(): Passing null to parameter #1 ($string) of type string is deprecated" Bug: T388944 Change-Id: Iaba9973aa774f0bac9cf56efc76bc249d4f578ee --- includes/Html/Html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes/Html') diff --git a/includes/Html/Html.php b/includes/Html/Html.php index 2c8426123dd4..8017f7ba310e 100644 --- a/includes/Html/Html.php +++ b/includes/Html/Html.php @@ -867,7 +867,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. -- cgit v1.2.3