fix: #3510868 Cast the search string before trimming it in the LinkIt matcher
Issue: https://www.drupal.org/project/anchor_link/issues/3510868
LinkIt can call the matcher with NULL, and PHP 8.1 deprecates passing NULL to ltrim().
Rebased onto 3.0.x.
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
AI-Generated: Yes
Edited by Rajab Natshah