aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Html
diff options
context:
space:
mode:
authorPaladox <thomasmulhall410@yahoo.com>2025-03-17 13:40:57 +0000
committerPaladox <thomasmulhall410@yahoo.com>2025-03-17 13:41:27 +0000
commite3dd105b209597ccff5eb8a39e79bdc75c1a9b8a (patch)
tree2f25e126a2230b2583fd1b860dbd6b41a81d18a7 /includes/Html
parenta0b926c81ff8b6737a42aec4dbf9eda15c9a5084 (diff)
downloadmediawikicore-e3dd105b209597ccff5eb8a39e79bdc75c1a9b8a.tar.gz
mediawikicore-e3dd105b209597ccff5eb8a39e79bdc75c1a9b8a.zip
Html: Fix "substr(): Passing null to parameter #1 ($string) of type string is deprecated"
Bug: T388944 Change-Id: Iaba9973aa774f0bac9cf56efc76bc249d4f578ee
Diffstat (limited to 'includes/Html')
-rw-r--r--includes/Html/Html.php2
1 files changed, 1 insertions, 1 deletions
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.