Closed driesvints closed 3 years ago
Hi Dries! Thank you for the issue reporting. I fixed it and new version 2.7.1 was released.
In version 2.7, there is a new feature for automatic long URLs shortening. It can be disabled using the option: $lfinder = new LinkFinder(["shorten_long_urls" => false]);
@yarri amazing! Thank you so much for the quick reply & fix 🙂
I'm trying to parse a certain Markdown content string provided from user input for a new thread of the Laravel.io forums: https://laravel.io/forum
I don't have control over this content. This is what they provided:
We use the link finder like so:
Which with the above content produces the following
ErrorException
:Undefined array key "uri"
. Which can be lead back to this line here: https://github.com/yarri/LinkFinder/blob/9d6434dae4d527fbcfff1e177905780babeaf2e5/src/link_finder.php#L440You can reproduce it with the following test:
The reason why I haven't filled out the
assertEquals
is because I'm not 100% sure how this should be handled since technically they're posting a PHP snippet. I'll leave it up to you to decide how you want to handle it.