Deprecation warning when using Live Link

Bug Summary

When using Live Link, I get a deprecated warning from PHP:

str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

It’s coming from the local-by-flywheel-live-link-helper.php mu-plugin on line 155.

I’ve worked around the issue by adding the following code at the start of the \LocalWP_Live_Link_Helper::make_link_tunnel() method:

if ( ! is_string( $str ) ) { 
	return $str;
}

Steps to reproduce

Access a site via Live Link

Environment Info

Describe your environment.

  • What Operating System are you using? ChromeOS
  • What versions of site software (Nginx, Apache, PHP, MySQL) is used? Nginx, PHP 8.1.29
  • What version of Local is installed? Version 9.0.5+6706

Looks familiar. Warning: Array to string conversion and other warnings - #2 by afragen