Passing null to parameter #n ($string) of type string is deprecated
php8.1 へのバージョンアップで陥る問題の一つ.
まだ DEPRECATED で非推奨だと言っているだけだが PHP を使い続けるなら,そろそろ直したほうがいいだろう.

解説元ページ
Passing null to non-nullable parameters of built-in functions
Passing null to parameter
「引数に NULL が来る可能性があるならあらかじめ NULL が入らないように対処しなさい.」と言っている.
エラーメッセージとしては
Passing null to parameter #1 ($string) of type string is deprecated
のような感じ.
だと,「第一引数に null が来る可能性があるから入らないようにしろ」と言っている.
1 が 2 なら,第二引数になる.何番目の引数かということだ.
例えば,
<?= strip_tags($contents,"<br />"); ?>
という PHP があった場合,
<?= $stBun ? strip_tags($contents,"<br />") : ''; ?>
あるいは
<?php echo $stBun ? strip_tags($contents,"<br />") : ''; ?>
のように null のことも考えて書くようにする.
起こりうる関数
ほとんどの関数で起こるが例にあげてみると,
strtok() strip_tags() preg_split() DOMDocument::createElement()
などなど...