Same issue on 2 sites.
Both sites still running under Joomla 3 - latest version .
Error started to show after PHP upgrade to version 8.1
When trying to make a link in an article the following error message shows as per attachment
When using Tiny MCE editor this error does not occur