I am using the latest Joomla 4.1.2 with PHP 8.0.12. Using ts4_b5_blank 1.1.5 and T4 2.1.6.
The problem is not PHP. The actual line of the problem :
$linktype = (!empty($item->icon) ? $item->icon : "") . $linktype . $item->caret . $item->caption;
The problem is with "$item->caption" being undefined when Offcanvas menu is disabled.
BUT, when I enable Offcanvas menu these errors are not there.
If I disable the Offcanvas menu these errors appear.
See attached images.
D.