Commit 235baf9
committed
Do not set domainRegExp for local files
`parse_url($this->url, \PHP_URL_HOST)` will return `null` for local filesystem path.
Casting it to `string` will produce an empty regular expression,
which would match any link when computing link density.
(cherry picked from commit c7208f6)
This also fixes a warning since 1.x passes the `null` directly to `preg_replace` instead of explicitly casting it to `string`.1 parent 487ce3a commit 235baf9
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1396 | 1396 | | |
1397 | 1397 | | |
1398 | 1398 | | |
1399 | | - | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
1400 | 1403 | | |
1401 | 1404 | | |
1402 | 1405 | | |
| |||
0 commit comments